-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Ability to use private registry #99
Comments
@Prodian0013 in general k8s can support private repos through pull secrets. Are you looking for a way to either replicate the images need for k3s in your private repo or will #92 suffice? |
@ibuildthecloud our current implementation uses docker and kubeadm to init the cluster. Prior to the kube init each image is preloaded on each node from a private registry and tagged to the original image name. Of course this is all automated. |
It would be great to have this working with internal private registries in general (not just for setup), both with and without auth, for CI pipelines and such. I use |
The support for private registry can be done from containerd template but its complicated so proposing these designs to this feature: Design 1
Design 2
|
@galal-hussein Design 2 sounds better given that there are password/secrets involved. I would just default the file to |
Verified using master. |
So… how can we use this? there's no documentation for this feature and file format of that |
What sort of mechanisms do we have to easily and automatically provision a private registry across all nodes?
I’m asking this because I was previously using an insecure private registry running on he master node, and all I had to do was copy the old configuration file across. Now to have an air-gapped cluster I have to do the entire CA rigmarole and copy across certificate files as well.
Are we sure that containerd does not support HTTP-only registries at all?
… On 22 Nov 2019, at 17:05, David Nuzik ***@***.***> wrote:
This is documented here: https://rancher.com/docs/k3s/latest/en/installation/airgap/#create-registry-yaml
We'll look into documenting separately from an air-gap scenario. Registry cannot be insecure (containerd requires this).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@davidnuzik thanks! I was able to recreate config from source code ;) But yeah… I didn't know about that air-gap, still don't know what's that and separating is good idea! |
@morsik Here is a sample registries.yaml content that works for me -
|
FYI PR for adding documentation for Private Registry rancher/docs#2194 |
It looks like this will break when you supply a registry password that is a json key, i.e |
Yeah, I'm trying to figure out how to give agent nodes access to a private GCR with a service account using docker as the container manager. Ideally it would there would just be a secret in the cluster that could be referenced via |
Hi all, I am trying to use docker registry with my k3s. I have docker registry running in a different server (dockerregistryip) and the k3s master in another (k3smasterip) I have followed the instruction of setting up the docker login and certs as in the documentation and it worked. I can push and pull the images. I did the following setup with docker login myregistrydomain.com:443. This was done in k3smasterip vi /etc/hosts
(dockerregistryip) myregistrydomain.com vi /etc/docker/daemon.json
{
"insecure-registries" : ["https://myregistrydomain.com:443"]
} mkdir /etc/docker/certs.d
mkdir /etc/docker/certs.d/myregistrydomain.com cp certs/domain.crt /etc/docker/certs.d/myregistrydomain.com/ca.crt
cp certs/domain.key /etc/docker/certs.d/myregistrydomain.com/
cp certs/domain.crt /etc/docker/certs.d/myregistrydomain.com/domain.cert cp certs/domain.crt /usr/local/share/ca-certificates/myregistrydomain.com.crt
update-ca-certificates sudo systemctl restart docker
sudo docker info For k3s, I followed the instruction for WITH TLS and AUTHENTICATION
When I do a deployment with the image which is there in repository I get the following error
ERROR: DETAILS: Have I misconfigured k3s? because docker in k3master server can push and pull images from dockerregistryip. Your help will be really appreciated. |
Solved it by adding insecure_skip_verify flag to true. I think this is needed for self-signed certs. |
No @armourshield - the error message tells you what the problem is: You need to update the cert on your registry to include the hostname in its Subject Alternative Names. Go 1.15 no longer supports certs without SANs unless you set the environment variable mentioned in the error. |
Where do we add the insecure_skip_verify flag? Thanks! |
Is your feature request related to a problem? Please describe.
The current installation method requires internet access.
Describe the solution you'd like
Provide the capability to use a private registry when initializing the k3s server and agent.
Describe alternatives you've considered
Use
crictl
to pull the images from a private registry (unproven at this point).Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: