1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | apiVersion: apps/v1 kind: Deployment metadata: labels: app: deploy-test name: deploy-test spec: replicas: 6 selector: matchLabels: app: deploy-test strategy: type: RollingUpdate rollingUpdate: maxSurge: 2 maxUnavailable: 1 template: metadata: labels: app: deploy-test spec: containers: - image: nginx:1.9.0 name: nginx | cs |
kubectl set image deployment/[디플로이먼트_이름] [컨테이너_이름]=[이미지]:[버전]
ex) kubectl set image deployment/deploy-test nginx=nginx:1.9.2
kubectl rollout status deployment [디플로이먼트_이름]
ex) kubectl rollout status deployment deploy-test
or
kubectl describe deployments.apps [디플로이먼트_이름]
ex) kubectl describe deployments.apps deploy-test
kubectl rollout undo deployment [디플로이먼트_이름]
ex) kubectl rollout undo deployment deploy-test
kubectl rollout history deployment [디플로이먼트_이름]
ex) kubectl rollout history deployment deploy-test
and
kubectl rollout history deployment [디플로이먼트_이름] --revision=[리비전_버전]
ex) kubectl rollout history deployment deploy-test --revision=3
참고할께요 감사합니다.