Failed to pull image "/posts:0.0.1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for /posts, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Debian 10, minikube and kubectl installed and docker. if i run docker with this image - all is fine.
pavel@debian:~$ kubectl version Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"123", GitTreeState:"clean", BuildDate:"2020-11-11T13:17:17Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"123", GitTreeState:"clean", BuildDate:"2020-11-11T13:09:17Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
posts.yaml
apiVersion: v1
kind: Pod
metadata:
name: posts
spec:
containers:
- name: posts
image: <mylogin>/posts:0.0.1
kubectl apply -f posts.yaml
debian:~$ kubectl describe pod posts
Name: posts
Namespace: default
Priority: 0
Node: minikube/192.168.49.2
Start Time: Wed, 25 Nov 2020 07:06:47 +0400
Labels: <none>
Annotations: <none>
Status: Pending
IP: 172.17.0.4
IPs:
IP: 172.17.0.4
Containers:
posts:
Container ID:
Image: <mylogin>/posts:0.0.1
Image ID:
Port: <none>
Host Port: <none>
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-b9gkg (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
default-token-b9gkg:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-b9gkg
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 23m default-scheduler Successfully assigned default/posts to minikube
Normal Pulling 21m (x4 over 23m) kubelet Pulling image "<mylogin>/posts:0.0.1"
Warning Failed 21m (x4 over 23m) kubelet Failed to pull image "<mylogin>/posts:0.0.1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for <mylogin>/posts, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 21m (x4 over 23m) kubelet Error: ErrImagePull
Warning Failed 7m53s (x63 over 23m) kubelet Error: ImagePullBackOff
Normal BackOff 2m58s (x84 over 23m) kubelet Back-off pulling image "<mylogin>/posts:0.0.1"
imagePullSecrets:
, or if the image is genuinely missing from docker hub and thus you are using a "local" image that your machine can see but no one else can. Either way, this is not a programming question, and thus belongs on ServerFault.com