Deployment 5 commonly used parameters
Start a deployment
kubectl create -f helloworld.yml
kubectl get deployment
kubectl get rs
label should be helloworld
kubectl get pods --show-labels
kubectl rollout status deployment/helloworld-deployment
kubectl expose deployment helloworld-deployment --type=NodePort
kubectl get svc
kubectl describe service helloworld-deployment
Get 3 node IP and port, curl
curl cluster ip
curl 10.10.187.253:3000
Change to a new version of image, under curl, it is found that the content becomes v2
kubectl set image deployment / helloworld-deployment k8s-demo = wardviaene / k8s-demo: 2
kubectl rollout status deployment/helloworld-deployment
curl 10.10.187.253:3000
There is one more version in history
kubectl rollout history deployment/helloworld-deployment
You can also rollout to the last version
kubectl rollout undo deployment/helloworld-deployment