Kubernetes Deployment Commands

# Create
> kubectl create -f deployment-definition.yml

# Create with record option for change-cause in revision history
> kubectl create -f deployment-definition.yml --record

# Get
> kubectl get deployments

# Describe deployment
> kubectl describe deployment my-deployment

# Update
> kubectl apply -f deployment-definition.yml
> kubectl set image deployment/my-deployment httpd=httpd:2.6.1

# Runtime update
> kubectl edit deployment my-deployment --record

# Status
> kubectl rollout status deployment.apps/my-deployment
> kubectl rollout history deployment.apps/my-deployment

# Rollback
> kubectl rollout undo deployment/my-deployment

# Delete
> kubectl delete deployment my-deployment
  •  
  •  
  •  
  •  

Viet Luu has written 276 articles

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

We are thankful for your never ending support.