-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add private CA #64
Comments
Thanks for asking! In your scenario, what is the client and what is the server? This will help advise on where/how to wire up the CA trust anchors. i.e: is the error happening when trying to connect to the registry or from the registry? The more detail you can provide about the client and server certificate setup you have now, the better! Without, of course, sharing any sensitive key/certificate content. |
Hi, thanks for responding! The certificate comes from Hashicorp Vault CA, via a Cert-Manager ClusterIssuer, terminated by a Traefik IngressRoute on a MetalLB load balancer. My OS is Ubuntu. This script installs the helm chart:
|
This script exposes the registry service:
|
Thanks! That's super helpful. So, it sounds like what you're looking for is how to tell your Docker client which CA to trust when connecting to your registry, which happens to be using a private CA. I didn't know how to do that, but thinking of it that way helped me find this similar issue: containerd/containerd#3737. I also came across docker/for-mac#4100 (comment) for the format of the Docker configuration file (typically ~/.docker/config.json) where Ultimately, you need to tell the Docker CLI that it needs to use your desired CA when trying to connect to your registry. Based on those two issues, your Docker config might look something like this: {
"auths": {
"your-private-registry-domain": {
"auth": "base64(username:password)",
"tls": {
"caFile": "/path/to/your-private-ca-certificate.pem"
}
}
}
} I haven't personally tried that, but based on the links cited above, that's my guess on how to get the Docker CLI to use your private CA certificate for that registry. If that doesn't work, I hope it at least sets you on a path toward the answer, and when you find one, please share! Also, if anyone else has run into this issue and knows the answer, please chime in. I'll keep this issue open until we know how to make it work. |
I will test it out cheers, I do not require this however if I install the docker registry itself:
|
Doing it this way lets me in no issue:
|
What is the purpose of haSharedSecret? |
Ok I understand where I went wrong, apologies, I terminated the SSL connection at the Traefik IngressRoute, which then I guess opens a non-SSL connection to docker, which fails. |
Hi, is it possible to add a private CA chain cert for trust?
I added mine by ConfigMap to /etc/ssl/certs/, however still getting:
http: TLS handshake error from 10.42.8.197:45314: remote error: tls: bad certificate
The text was updated successfully, but these errors were encountered: