Error when pulling image built locally without a registry
See original GitHub issueI’ve followed the instructions from https://microk8s.io/docs/working “Working with locally built images without a registry” and I’m building a JVM app from Maven with the jib-maven-plugin
outputting to <image>outlooktoslack:local</image>
.
# microk8s.ctr -n k8s.io images ls
docker.io/library/outlooktoslack:local application/vnd.oci.image.manifest.v1+json
sha256:daa6391342d9283046fd75c55c4e255f1a3ae58afb005617e6d56e7607e1fd8e 74.3 MiB linux/amd64 io.cri-containerd.image=managed
I’ve tried with deployment as:
containers:
- name: outlooktoslack
image: outlooktoslack:local
and
containers:
- name: outlooktoslack
image: docker.io/library/outlooktoslack:local
but to no avail:
# kubectl get pods
outlooktoslack-56c8fd6956-qxm4g 0/1 ErrImagePull 0 99s
# kubectl describe pod outlooktoslack-6679cbddf5-85qhg
Normal Pulling 19m (x4 over 21m) kubelet, uppdragsboten-ny-ubuntu18 Pulling image "outlooktoslack:local"
Warning Failed 19m (x4 over 21m) kubelet, uppdragsboten-ny-ubuntu18 Failed to pull image "outlooktoslack:local": rpc error: code = Unknown desc = failed to resolve image "docker.io/library/outlooktoslack:local": no available registry endpoint: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Warning Failed 19m (x4 over 21m) kubelet, uppdragsboten-ny-ubuntu18 Error: ErrImagePull
# kubectl describe pod outlooktoslack-5878cf5-bpmgg
Warning Failed 17s kubelet, uppdragsboten-ny-ubuntu18 Error: ImagePullBackOff
Normal Pulling 3s (x2 over 17s) kubelet, uppdragsboten-ny-ubuntu18 Pulling image "docker.io/library/outlooktoslack:local"
Warning Failed 2s (x2 over 17s) kubelet, uppdragsboten-ny-ubuntu18 Failed to pull image "docker.io/library/outlooktoslack:local": rpc error: code = Unknown desc = failed to resolve image "docker.io/library/outlooktoslack:local": no available registry endpoint: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
I’m probably the one doing something wrong but you might be better at understanding what it is? Would be super happy with any help!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
unable to pull docker images from my local repository #2474
I'm unable to pull docker images from my local repository. I received the error. Failed to pull image "open-dataplatform-hadoop-hdfs": rpc error ...
Read more >docker - kubernetes cannot pull local image - Stack Overflow
So you have the image on your machine aready. It still tries to pull the image from Docker Hub, however, which is likely...
Read more >Kubernetes ImagePullBackOff error: what you need to know
If you're pulling an image from a private registry, make sure that you've created a Secret containing the credentials you need to acceess....
Read more >Kubernetes Error Codes: Failed to Pull Image | Datree.io
When the registry is offline, this won't succeed and a pull error will occur. Temporarily changing the image pull policy to `IfNotPresent` will ......
Read more >Kubernetes ImagePullBackOff: Troubleshooting With Examples
In most cases, the error could be either from a typo or the image was not pushed to the container registry, and you're...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gostaj Can you add
imagePullPolicy: Never
? orIfNotPresent
@gostaj, the registry addon is used by
microk8s.ctr
. The microk8s guide you pointed out explains how to use.I have this project in github (shameless plug) https://github.com/balchua/demo
Checkout the
skaffold.yaml
file there. For example https://github.com/balchua/demo/blob/master/votes/skaffold.yamlI may have some skaffold there still using dockercli, but its safe to turn it to false.
My normal dev workflow is building images using jib, push it to the registry addon in microk8s. Then deploy the apps in microk8s. All using
skaffold run -p <profile>
or sometimesskaffold dev -p <profile>
.