cloudfoundry-incubator / quarks-operator

BOSH releases deployed on Kubernetes
https://www.cloudfoundry.org/project-quarks/
Apache License 2.0
49 stars 35 forks source link

failed to pull cf-operator images from private docker registry- 2.7.1 & 2.7.12 #1287

Closed naveenspen14 closed 3 years ago

naveenspen14 commented 3 years ago

Hi Team,

while trying to pull cf-operator (2.7.1 & 2.7.12) images from private docker registry, except for quarks-statefulset pod other pods are able to pull from private docker registry.

k get pods -n cf-operator NAME READY STATUS RESTARTS AGE cf-operator-quarks-bf75bd6bd-2llqx 1/1 Running 0 2m13s cf-operator-quarks-job-69dd47c488-jlpqx 1/1 Running 0 2m13s cf-operator-quarks-secret-79444db496-9mdwq 1/1 Running 0 2m13s cf-operator-quarks-statefulset-6c88b796d4-qqjsv 0/1 ImagePullBackOff 0 2m13s

Events: Type Reason Age From Message


Normal Scheduled 63s default-scheduler Successfully assigned cf-operator/cf-operator-quarks-statefulset-6c88b796d4-qqjsv to k8s-worker-1-kubecf288 Normal SandboxChanged 50s kubelet, k8s-worker-1-kubecf288 Pod sandbox changed, it will be killed and re-created. Normal BackOff 24s (x4 over 50s) kubelet, k8s-worker-1-kubecf288 Back-off pulling image "myregistry/ghcr.io/cloudfoundry-incubator/quarks-statefulset:v0.0.1308-g6a8b2220" Warning Failed 24s (x4 over 50s) kubelet, k8s-worker-1-kubecf288 Error: ImagePullBackOff Normal Pulling 12s (x3 over 62s) kubelet, k8s-worker-1-kubecf288 Pulling image "myegistry/ghcr.io/cloudfoundry-incubator/quarks-statefulset:v0.0.1308-g6a8b2220" Warning Failed 12s (x3 over 51s) kubelet, k8s-worker-1-kubecf288 Failed to pull image "myregistry/ghcr.io/cloudfoundry-incubator/quarks-statefulset:v0.0.1308-g6a8b2220": rpc error: code = Unknown desc = Error response from daemon: Head https://myregistry/v2/ghcr.io/cloudfoundry-incubator/quarks-statefulset/manifests/v0.0.1308-g6a8b2220: unknown: Authentication is required Warning Failed 12s (x3 over 51s) kubelet, k8s-worker-1-kubecf288 Error: ErrImagePull

cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/177016256

The labels on this github issue will be updated when the story is started.

naveenspen14 commented 3 years ago

It was failed, since the cf-operator-quarks-statefulset values.yaml dont have mechansm to add credentials in values.yaml file. Below are the changes that need to be performed inorder to pull images for private docker registry for cf-operator-quarks-statefulset.

  1. Include global.image.credentials in values.yaml file for the images (quarks-stetefulset)
  2. added/created service-account-pull-secret.yaml for both under the templates directory
  3. calling image credentials from secret (created in 2nd step) in service-account.yaml

Same changes for cf-opeartor 2.6.1, 2.7.1, and 2.7.12.

manno commented 3 years ago

Seems like it's fixed now.