Docker pull working but getting imagepull backoff when running through gitlab pipeline


We are using gitlab for our pipelines. When we do docker pull on the kubernetes node, docker pull is able to pull the image from the Gitlab registry. But when i run the pipeline from the Gitlab CI/CD , i’m getting ImagePullBackoff error with X509: Certificate signed by unkown authority.

We are using open source kubernetes & self managed gitlab.

That SSL error means you are most likely using a self-signed certificate or a certificate from a CA that isn’t trusted. You need to be adding config in relation to using insecure registries. Either that or use a commercially purchased certificate or configure LetsEncrypt on your docker registery.

Most likely your Kubernetes node is already configured to allow connection to insecure registries and hence why it works. If the Gitlab Runner for CI/CD is using docker, then you can configure /etc/docker/daemon.json with the appropriate insecure registries information.