k8s experimental deployment

Deployment 5 commonly used parameters

image

image

Start a deployment

kubectl create -f helloworld.yml

image

kubectl get deployment

image

kubectl get rs

image

label should be helloworld

kubectl get pods --show-labels

image

image

kubectl rollout status deployment/helloworld-deployment

image

kubectl expose deployment helloworld-deployment --type=NodePort

image

kubectl get svc

image

kubectl describe service helloworld-deployment

image

Get 3 node IP and port, curl

image

curl cluster ip

curl 10.10.187.253:3000

image

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

image

There is one more version in history

kubectl rollout history deployment/helloworld-deployment

image

You can also rollout to the last version

kubectl rollout undo deployment/helloworld-deployment

image

image

Guess you like

Origin blog.51cto.com/433266/2536363