Tuesday, September 5, 2023
HomeSoftware EngineeringKubernetes Mastery: Half 3 - Exploring Kubernetes Assets

Kubernetes Mastery: Half 3 – Exploring Kubernetes Assets


Welcome again to the Kubernetes Mastery Sequence! On this third half, we’ll delve into the world of Kubernetes sources and handle them successfully.

Earlier than we start, guarantee you’ve got your Kubernetes cluster up and working. Should you’ve been following together with the sequence, your KinD cluster ought to already be arrange.

Pods, Deployments, and Providers

1. Checklist Pods

# Checklist all pods within the default namespace
kubectl get pods

# Checklist pods in a selected namespace
kubectl get pods -n <namespace>

2. Describe a Pod

# Describe a pod by title
kubectl describe pod <pod-name>

3. Scale Deployments

# Scale a deployment to a desired variety of replicas
kubectl scale deployment/<deployment-name> --replicas=<desired-replicas>

4. Replace Deployments

# Replace the picture of a deployment
kubectl set picture deployment/<deployment-name> <container-name>=<new-image>

5. Create a Service

# Create a service to reveal a deployment
kubectl expose deployment <deployment-name> --port=<port> --target-port=<target-port> --type=NodePort

ConfigMaps and Secrets and techniques

6. Create a ConfigMap

# Create a ConfigMap from literal values
kubectl create configmap <configmap-name> --from-literal=<key1>=<value1> --from-literal=<key2>=<value2>

7. Create a Secret

# Create a Secret from literal values
kubectl create secret generic <secret-name> --from-literal=<key1>=<value1> --from-literal=<key2>=<value2>

Persistent Volumes and Persistent Quantity Claims

8. Create a Persistent Quantity (PV)

# Create a Persistent Quantity
kubectl apply -f pv.yaml

9. Create a Persistent Quantity Declare (PVC)

# Create a Persistent Quantity Declare
kubectl apply -f pvc.yaml

Namespaces

10. Create a Namespace

# Create a brand new namespace
kubectl create namespace <namespace-name>

These are just some examples of how one can work together with Kubernetes sources. Kubernetes provides a wealthy set of useful resource varieties for managing functions and their configurations.

Keep tuned for the subsequent half in our Kubernetes Mastery Sequence:
Half 4 – Deploying Stateful Purposes



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments