OpenShift 4.1 | Horizontal POD Auto scaling (HPA) | All PODS are not updating with latest image

12/17/2019

In CI/CD Pipeline, we are using below oc set image command [1] to deploy pods on OpenShiftV4.1. During HPA, Only Single POD is updating with latest image.Rest of the PODS are having old image.

For instance, currently 4 pods are available with nginxV1.9.1. After we ran below command [1], only ONE POD is having latest nginxV1.9.2. Rest of the 3 pods are having old image version nginxV1.9.1.

As per my knowledge, all the PODS should get latest image. could you please shed some light what am i missing here.

[1] oc set image deployment/nginx-deployment nginx=nginx:1.9.2

Environment: OpenShift V 4.1,Docker V 18.x

-- user1635014
horizontal-scaling
kubernetes
openshift

1 Answer

12/17/2019
 oc set image -h

Usage:
  oc set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N

You need to provide the name of each container with its new image CONTAINER_NAME_1=CONTAINER_IMAGE_1

-- Suresh Vishnoi
Source: StackOverflow