Mastering Kubernetes Deployments With Kubectl Commands
Create deployments with `kubectl create deploy NAME --image=IMAGE --replica NUM`. Scale or change image with `kubectl scale`/`kubectl set image`. Rollback with `k rollout undo`.
Deployment Basic CMD # Create kubectl create deploy NAME --image=IMAGE --replica NUM # Scale (or use kubectl edit) kubectl scale deploy NAME --replicas NUM # Change image of deploy kubectl set image deployments/DP_NAME ContainerName=IMAGE k set image deployments/apache httpd=httpd:alpine When using kubectl create cmd create the deployment, it will automatically add the same labels for both deployment and pods. So if you want to customize the label, it's better to print out --dry-run=client -oyaml the yaml file and have a check. And if not clear the contain...