I'm building docker images via jib and skaffold. When I provide the image key service-1
in skaffold build.artifacts.image, an image is created (Image named 'service-1:SHA256') and I can see that through docker image ls
. Then in skaffold deploy, I provide kubectl commands, where its picking up the image created just fine. In my deployment.yaml manifest file, I specify just spec.template.spec.containers.image : service-1
The above method is working fine, but I want to do helm. I have created helm charts. But helm is not able to pickup any image from my local docker daemon repo. If I specify image:service-1:SHA256 that's present when I see docker image ls
, I get ErrImagePull.
Why isn't helm able to pick the image from my local docker registry. I'm also not able to docker pull service-1:sha256.
What's the default docker registry that's being used, and how is skaffold with kubectl able to pull the image correctly, while helm and docker cannot.
I tried skaffold+helm also, but faced the same issue.
apiVersion: skaffold/v2alpha3
kind: Config
metadata:
name: service-1
build:
artifacts:
- image: service-1
jib:
project: com.sample.app:service-1
args:
- -Dmaven.test.skip
deploy:
helm:
releases:
- name: service-1
chartPath: service-1-chart
values:
image: service-1
valuesFiles:
- service-1-chart/values.yaml
Getting the following during pod describe
Normal Scheduled 75s default-scheduler Successfully assigned default/service1-df75c747b-g6qfm to docker-desktop
Normal Pulling 29s (x3 over 74s) kubelet, docker-desktop Pulling image "service-1:e7d693388f7f26a062257408e3cfb5904da4749342729802eb9ac65fab6d2f31"
Warning Failed 27s (x3 over 73s) kubelet, docker-desktop Failed to pull image "service-1:e7d693388f7f26a062257408e3cfb5904da4749342729802eb9ac65fab6d2f31": rpc error: code = Unknown desc = Error response from daemon: pull access denied for service-1, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 27s (x3 over 73s) kubelet, docker-desktop Error: ErrImagePull
Normal BackOff 2s (x4 over 72s) kubelet, docker-desktop Back-off pulling image "service-1:e7d693388f7f26a062257408e3cfb5904da4749342729802eb9ac65fab6d2f31"
Warning Failed 2s (x4 over 72s) kubelet, docker-desktop Error: ImagePullBackOff
When I try to do docker pull:
Error response from daemon: pull access denied for service-1, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
If you don't want to use Docker registry, but to run the image directly from your Docker Daemon, then add imagePullPolicy: Never
.