I have created a Docker image and is in my local repository like this:
docker build -t myimage:latest .
When I list my images I can see it just fine:
docker image ls --all
REPOSITORY TAG IMAGE ID CREATED SIZE
myimage latest a91ac47487d4 28 minutes ago 370MB
Now I want to run this in Kubernetes, and here is my values.yaml image part:
image:
repository: myimage
pullPolicy: IfNotPresent
tag: "latest"
I then try and install it:
helm install --generate-name .
And I can see it trying to start:
NAMESPACE NAME READY STATUS RESTARTS AGE
default chart-1631993007-buildchart-594448fddb-4prt4 0/1 ImagePullBackOff 0 21s
I describe the pod:
kubectl describe pod chart-1631993007-buildchart-594448fddb-4prt4
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m3s default-scheduler Successfully assigned default/chart-1631993007-buildchart-594448fddb-4prt4 to minikube
Normal Pulling 97s (x4 over 3m2s) kubelet Pulling image "myimage:latest"
Warning Failed 96s (x4 over 3m1s) kubelet Failed to pull image "myimage:latest": rpc error: code = Unknown desc = Error response from daemon: pull access denied for myimage, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 96s (x4 over 3m1s) kubelet Error: ErrImagePull
Warning Failed 68s (x6 over 3m) kubelet Error: ImagePullBackOff
Normal BackOff 55s (x7 over 3m) kubelet Back-off pulling image "myimage:latest"
I understand that there is miss-naming somewhere, either when i installed the image locally, or how I am pulling it in my helm values.yaml, But I just can't figure out where the miss-match is.
Any help would be great, thank you.