OpenShift :: POD is not inheriting "name label" from the deployment config

11/27/2018
  1. I created a build config from the git repo (Docker based app).

    oc new-build <git-url> --name=myApp

  2. Created a deployment config using:

    oc create dc myApp --image=<image-stream-repo>

I am adding labels to this deployment config from the UI.

  1. Now when I deploy the application (from the UI) or use oc rollout, the POD is created and the application is running in the POD.

But the label (name: myApp) is not being applied to the POD. As a result the selector in the service is failing to identify the POD. The service is configured with label name: myApp as POD selector.

If I go to the created POD and edit yaml and add name: myApp in the labels section, only then the POD is being identified by the service.

In case if any one has faced similar issue, please provide your inputs in overcoming this problem.

-- snmaddula
kubernetes
openshift
openstack

0 Answers