0

I have created one docker image and publish that image to Jfrog Artifactory. Now, I am trying to create kubernetes Pod or trying to create deployment using that image.

Find the content of pod.yaml file

apiVersion: v1
kind: Pod
metadata:
   name: <name of pod>
spec:
   nodeSelector:
      type: "<name of node>"
   containers:
      - name: <name of container>
        image: <name and path of image>
        imagePullPolicy: Always

But I am getting ErrImagePull status after pod creation. That means pod is not getting created succesfully. Error: error: code = Unknown desc = failed to pull and unpack image

Can anyone please help me with this?

vaijayanti
  • 11
  • 1
  • Have you tried googling for ImagePullBackOff? What problems did you encountered during that process? – 9ilsdx 9rvj 0lo Sep 22 '21 at 11:12
  • Please find the complete describe error message: Failed to pull image "": rpc error: code = Unknown desc = failed to pull and unpack image "": failed to resolve reference "": failed to do request: Head "t": x509: certificate signed by unknown authority Warning Failed 19m (x4 over 21m) kubelet Error: ErrImagePull Warning Failed 19m (x6 over 21m) kubelet Error: ImagePullBackOff Normal BackOff 75s (x88 over 21m) kubelet Back-off pulling image – vaijayanti Sep 22 '21 at 11:25
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 29 '21 at 10:22

2 Answers2

1

If you work with private registry so you need to supply imagePullSecrets with the credentials to pull the image.

1

Please assure that you're creating the secret kubernetes.io/dockerconfigjson under the same namespace.