kubectl rollout status deploy/{deploy이름}
kubectl rollout history deploy/{deploy이름}
.spec.strategy.type==Recreate
.spec.strategy.type==RollingUpdate
정의 파일 수정하기
# 파일 수정 후 명령어 사용
kubectl apply -f {yaml파일}
set 명령어로 수정하기
kubectl set image deploy/{deploy이름} {컨테이너이름}={변경할 이미지이름:태그}
controlplane ~ ➜ kubectl describe deploy frontend
Name: frontend
Namespace: default
CreationTimestamp: Tue, 02 Jan 2024 08:24:37 +0000
Labels: <none>
Annotations: deployment.kubernetes.io/revision: 1
Selector: name=webapp
Replicas: 4 desired | 4 updated | 4 total | 4 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 20
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Pod Template:
Labels: name=webapp
Containers:
simple-webapp:
Image: kodekloud/webapp-color:v1
Port: 8080/TCP
Host Port: 0/TCP
Environment: <none>
Mounts: <none>
Volumes: <none>
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing True NewReplicaSetAvailable
OldReplicaSets: <none>
NewReplicaSet: frontend-58f7796bbb (4/4 replicas created)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ScalingReplicaSet 5m38s deployment-controller Scaled up replica set frontend-58f7796bbb to 4
Labels name=webapp 이 아니라 container 이름으로 입력해야함
controlplane ~ ✖ kubectl set image deploy/frontend simple-webapp=kodekloud/webapp-color:v2
deployment.apps/frontend image updated