how to ensure Scaled down pod replica is success

12/24/2021

I want to update k8s deployment image from 22.41.70 to 22.41.73,as follow:

NewReplicaSet:   hiroir-deployment-5b9f574565 (3/3 replicas created)
Events:
  Type    Reason             Age    From                   Message
  ----    ------             ----   ----                   -------
  Normal  ScalingReplicaSet  13m    deployment-controller  Scaled up replica set hiroir-deployment-7ff8845548 to 3
  Normal  ScalingReplicaSet  8m56s  deployment-controller  Scaled up replica set hiroir-deployment-5b9f574565 to 1
  Normal  ScalingReplicaSet  8m56s  deployment-controller  Scaled down replica set hiroir-deployment-7ff8845548 to 2
  Normal  ScalingReplicaSet  8m56s  deployment-controller  Scaled up replica set hiroir-deployment-5b9f574565 to 2
  Normal  ScalingReplicaSet  8m52s  deployment-controller  Scaled down replica set hiroir-deployment-7ff8845548 to 1
  Normal  ScalingReplicaSet  8m52s  deployment-controller  Scaled up replica set hiroir-deployment-5b9f574565 to 3
  Normal  ScalingReplicaSet  8m52s  deployment-controller  Scaled down replica set hiroir-deployment-7ff8845548 to 0

I want to know how to ensure Scaled down pod replica is success?

-- jixiang8320216_container
kubernetes

1 Answer

12/24/2021

You can check using kubectl get deployment <name, eg. hiroir> --namespace <namespace if not default> -o wide. Look at the "AVAILABLE" column and check the count if it aligns to last scaled replicas count, "IMAGES" column for the image that you have updated.

-- gohm&#39;c
Source: StackOverflow