We have a private Docker registry and we're attempting to get a our Kubernetes cluster to pull images from it, but it's failing with the following error:

  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  104s               default-scheduler  Successfully assigned namespace/service-8599c54df8-592wm to fat2
  Normal   Pulling    67s                kubelet            Pulling image ""
  Warning  Failed     67s                kubelet            Error: ErrImagePull
  Warning  Failed     67s                kubelet            Failed to pull image "": rpc error: code = Unknown desc = failed to pull and unpack image "": failed to resolve reference "": failed to do request: Head "": x509: certificate signed by unknown authority (possibly because of "x509: invalid signature: parent certificate cannot sign this kind of certificate" while trying to verify candidate authority certificate " hostname")
  Warning  Failed     65s (x2 over 66s)  kubelet            Error: ImagePullBackOff
  Normal   BackOff    65s (x2 over 66s)  kubelet            Back-off pulling image ""

I have copied the certificates from the Docker registry to /etc/docker/certs.d/ and I have copied the secret verbatim from another cluster that has absolutely no problem pulling images from our Docker registry. Regardless, here it is (as a Helm template):

apiVersion: v1
kind: Secret
  name: {{ .Values.global.image_pull_secret }}
  namespace: {{ .Values.global.namespace }}
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/release-name: {{ .Release.Name }}
    app.kubernetes.io/release-namespace: {{ .Release.Namespace }}
  .dockerconfigjson: {snipped}
type: kubernetes.io/dockerconfigjson

I have verified I can successfully connect with a docker login:

$ docker login
Username: myuser
WARNING! Your password will be stored unencrypted in /home/myuser/.docker/config.json.
Configure a credential helper to remove this warning. See

Login Succeeded

I have completely run out of ideas here, but it seems the new cluster doesn't trust the CA that signed the certificate from the Docker registry. I'm at my wits end, so any help here is greatly appreciated.

1 Answer 1


Finally got it working. I had to install the root certificate by copying it to /etc/ssl/tls/certs. This is the root certificate that was used when creating the certificate for the Docker registry. In the error message, this is the certificate for the CA, which is referenced at the end: " hostname".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.