Features
- Deploy and manage applications (Containers)
- Scale up and down according to demand
- Zero downtime deployments
- Rollbacks
Kubectl command
Run commands against your cluster
- Deploy
- Inspect
- Edit resources
- Debug
- View Logs
kubectl config view
kubectl config get-contexts
kubectl config current-context
kubectl config set-credentials kubeuser/username.kubernetes.com --username=kubeuser --password=<Whatever>
kubectl apply
Creating objects:
kubectl apply -f ./my-manifest.yaml
kubectl apply -f ./my1.yaml -f ./my2.yaml
kubectl apply -f ./dir
kubectl apply -f https://git.io/vPieo
kubectl create deployment nginx --image=nginx
kubectl create job hello --image=busybox -- echo "Hello World!!!"
kubectl explain pods
kubectl get services
kubectl get pods --all-namespaces
kubectl get deployment my-dep
kubectl describe nodes my-node
kubectl get pv --sort-by='.status.containerStatuses[0].restartCount'
kubectl rollout history deployment/frontend
kubectl rollout undo deployment/frontend
kubectl rollout status -w deployment/frontend
kubectl scale --replicas=3 rs/foo
POD-specific
kubectl get pods
kubectl rollout undo deployment/frontend
kubectl get pods --all-namespaces
kubectl get pod <POD-name> -o wide
kubectl get pod <POD-name> -o yaml
kubectl describe pod <POD-name>
Create one or more Deployments
kubectl run <POD-name> --image=<Image-name> --record
Scaling PODs
kubectl scale deployment/<POD-name> --replicas=3
Deployment history
kubectl rollout history deployment/<Deployment-name>
No comments:
Post a Comment