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?
CodePudding user response:
If you work with private registry so you need to supply imagePullSecrets with the credentials to pull the image.
CodePudding user response:
Please assure that you're creating the secret kubernetes.io/dockerconfigjson under the same namespace.