Kubernetes keep getting ErrImagePull

7/26/2019

I'm trying to install Tremolo's OpenUnison Orchestra login portal - https://github.com/OpenUnison/openunison-k8s-login-activedirectory. However, when I'm running the installation command -

curl https://raw.githubusercontent.com/TremoloSecurity/kubernetes-artifact-deployment/master/src/main/bash/deploy_openunison.sh | bash -s /path/to/orchestra-configmaps /path/to/orchestra-secrets https://raw.githubusercontent.com/OpenUnison/openunison-k8s-login-activedirectory/master/src/main/yaml/artifact-deployment.yaml

K8S tries to deploy docker.io/tremolosecurity/kubernetes-artifact-deployment:1.1.0

But I keep getting the following error(Using kubectl descrive pods -n openunison-deploy):

Failed to pull image "docker.io.tremolosecurity.kubernetes-artifact-deployment:1.1.0": rpc error: code = Unknown desc = context canceled

And then there is an event of Error: ErrImagePull and then Back-off pulling image.. and it goes back on.

How can I fixed it?

EDIT

I tried to simply docker pull docker.io/tremolosecurity/kubernetes-artifact-deployment:1.1.0 and it seems that there is a 100MB which takes a lot of time to download (more than 15 minutes already and not half way done) could this be the problem? As the error states that it failed pulling the image from docker.io...

-- ChikChak
docker
kubernetes

1 Answer

7/30/2019

As mentioned above by community mchawre and Amit Kumar Gupta:

1. For --image-pull-progress-deadline please verify your service by systemctl status kubelet, add option in the section ExecStart=--image-pull-progress-deadline=10m into your kubelet.service and run:

   sudo systemctl daemon-reload 
   sudo systemctl restart restart kubelet

verify kubelet flags by running:

journalctl -u kubelet | grep flag

2. In case you can pull image using docker please setup in your deployment spec: imagePullPolicy: IfNotPresent

3. Update your docker installation the latest one and Cleanup docker resources

docker images
docker rmi <unused imgaes>
docker system prune
docker image prune -a
docker info

4. Due to other problem with your configuration please consider docker re-installation.

Hope this help.

-- Hanx
Source: StackOverflow