본문 바로가기

CKA &. CKAD/Application Lifecycle Management

Rolling Update and Rollout

 

 

 

[Summarize Command]

 

ㅁ Create

kubectl create -f deployoment-definition.yml

 

ㅁ Get

kubectl get deployments

 

ㅁ Update

kubectl apply -f deployment-definition.yml

 

kubectl set image deployment/myapp-deployment nginx=nginx:1.9.1

 

ㅁ Status

kubectl rollout status deployment/myapp-deployment

 

kubectl rollout history deployment/myapp-deployment

 

ㅁ Rollback

kubectl rollout undo deployment/myapp-deployment

                                              

[Practice Test]

 

Hello, Application Version: v1 ; Color: blue OK

 

ㅁ Inspect the deployment and identify the number of PODs deployed by it

kubectl get deployments

ㅁ What container image is used to deploy the application?

kubectl get deployment -o wide

ㅁ Inspect the deployment and identify the current strategy

kubectl describe deployment frontend | grep -i StrategyType

 

ㅁ If you were to upgrade the application now what would happen?

- PODs are upgraded few at a time

- All PODs are taken down before upgrading any

 

ㅁ Let us try that. Upgrade the application by setting the image on the deployment to 'kodekloud/webapp-color:v2'

kubectl edit deployment frontend

 

ㅁ Change the deployment strategy to 'Recreate'

kubectl edit deployment frontend

Stratagy.Type: RollingUpdate 

Stratagy.Type: Recreate
and RollingUpdate 관련 설정 삭제 

'CKA &. CKAD > Application Lifecycle Management' 카테고리의 다른 글

Secret Practice Test  (0) 2021.03.27
Secret  (0) 2021.03.27
ConfigMap Practice Test  (0) 2021.03.27
Configure Environment Variable in Applications  (0) 2021.03.27
Application Commands & Argument and Practice Test  (0) 2021.03.27