-
Notifications
You must be signed in to change notification settings - Fork 772
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
upgrade to 1.14 seems to have broken my access to private registries #384
Comments
It's the same for me. I use microk8s registry without https and kubelet tries to pull from that registry using https, and I configure the options to the containerd through the containerd-template.toml for insecure-registries, but ignores them. |
well, my registry responds on both https and http so i don't think that's the issue for me |
You can try to add authorization. See the docs |
Before the update, I just needed to add to "insecure-registries" : ["localhost:32000", "registry.test:5000"] to be able to use a remote unsecure registry Since the update, even with this, now MicroK8S try to pull images on https instead of http:
|
I'm seeing the same issues within my Polyaxon deployment:
I've added 127.0.0.1:31813 to the |
@maltebaumann Try to add the configuration into containerd-template.toml, and restart the containerd daemon |
fwiw, to the folks saying "add the configuration the the containerd config", that's not how kubernetes works, i need to be able to set the values using secrets |
Since integration with registries is producing friction, we could try to have some command/addon that would automate the process of adding/configuring/removing registries (including the management of secrets). I would also kindly ask you when you report an issue to also include instructions on how to reproduce the error you are seeing. Please, do not assume I know anything about your setup eg how the registry you have was setup. At this point I can only point you to the following resources:
|
Hey @ktsakalozos, thanks for getting back and the awesome help on Slack. I managed to reproduce the exact behaviour I'm seeing in a multipass VM on my MacBook. I'll describe the steps below: Test-Env: MacOS 10.14.2 Mojave, MacBook Pro MacBook Pro (13-inch, 2018) Microk8s setup in VM using multipass (4 CPUs is important for Polyaxon installation to succeed):
Enter VM using
Add
Proceed with Polyaxon installation:
The running Polyaxon installation now provides an internal registry at 127.0.0.1:31813. To test it, I followed the steps from #382 (comment):
This yields the error message I'm seeing on my production cluster as well:
So I edit
Then I restart the cluster: Inspecting the pod again, the issue remains:
To be safe I delete the pod using
Edit: Forgot the files: |
@maltebaumann, thank you for the detailed description. There are two things that look strange. First you never tell docker you are talking to an insecure registry yet you can push images there (https://docs.docker.com/registry/insecure/). Second I was able to correctly reference the my-busybox image like this
in contanerd configuration. |
Thanks to your hint I at least managed to get Polyaxon working again: I'm now able to run experiments like I did before, but don't think this is a 'clean' solution. |
I too can't access my private registry and getting My setup is:
And I've got a private registry at port 5000. Note that this registry is not in Kubernetes. I've edited
My
But then when I try to
I get the dreaded After investigating for a while and going through containerd/containerd#2758, I tried doing
But then if I try with
So it seems |
I got this to work! I checked
If we trace that further, the hostname comes from the 'pull image request'. I wasn't entirely sure what that is but I figured it could very well be the hostname of the image repository, so then I tried editing
Restarted the service, tried deploying Bottom line is it seems we can't just put any arbitrary text after EDIT: after further investigation, I can confirm that it works like stated above. ParseNormalizedName will convert the image name into a fully qualified one that Docker can use unambiguously. When there's no host name, |
For anyone else hitting this (and waiting on a more long-term fix), @ps-feng 's comment fixes it, but if you are unfamiliar with what to restart-- For myself I edited the template then ran As expressed by others, this is really a poor upgrade experience :/ (not to mention still broken without manual changes 😱 ) |
Thanks @jacksontj |
@ps-feng 's comment seems to work to get the container to be accessed via http. Unfortunately, I also seem to be having a problem with a clean install that any requests to service ports via "localhost:" fail from the local machine (hang with no response). I'm running microk8s in a VM, I am up and running in the moment by ensuring that the VM DNS name from my laptop's /etc/hosts file is also assigned to the interface IP (not the loopback address) in the /etc/hosts of the VM. Once the hostname is the same both inside and outside the VM, I can replace "localhost" with the host name in @ps-feng 's fix. My /etc/hosts entry in OS X:
My /etc/hosts entry in the VM:
The edited section of containerd-template.toml
I've mucked with my VM configuration some, so conceivably I caused the problem there. However, I have a clean install on a physical node on my network, and if I enable the registry service and try to access it via 'localhost:32000' there it fails as well. I can get a response from that port from off the box, but not on the box via localhost. Probably a separate problem, but sharing the above fix here in case it helps someone else. |
I struggled with the same, here are a few more tips that helped me resolve it:
This is what worked for me. |
After a long road on my end, it appears this was all user error. I can pull images when the imagePullSecrets key is set to the correct name. I believe this issue can be closed when @termie gets to it.
|
Please note that if you have username / password defined for you private registry, you will have to also add auth section in containerd.toml file. Defining mirror is not enough. An example:
Solution comes from this stackoverflow answer: https://stackoverflow.com/a/56788222 If you do not define auth infos for mirror in the auth section, you will continue to receive https client error: http: server gave HTTP response to HTTPS client, which can be misleading. |
Hi! I am also having issues with using the insecure registry that microk8s provides... I have edited [plugins.cri.registry]
[plugins.cri.registry.mirrors]
[plugins.cri.registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
[plugins.cri.registry.mirrors."localhost:32000"]
endpoint = ["http://localhost:32000"]
[plugins.cri.registry.auths]
[plugins.cri.registry.auths."localhost:32000"]
username = "test"
password = "test" (I have also added the insecure registry to I also ran
But got the same error:
Kubernetes version: Server Version: version.Info
{
Major:"1",
Minor:"17",
GitVersion:"v1.17.0",
GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf",
GitTreeState:"clean",
BuildDate:"2019-12-07T21:12:17Z",
GoVersion:"go1.13.4",
Compiler:"gc",
Platform:"linux/amd64"
} |
I had some painful issues with this and couldn't really find the solution online anywhere and had to piece it together, so in case anyone comes along with the same issue of being unable to pull images from a self-signed Docker registry, I had to modify the [plugins."io.containerd.grpc.v1.cri".registry] section of /var/snap/microk8s/current/args/containerd-template.toml to skip verification like so -
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm under some restrictions about uploading the tarball from microk8s inspect, but
args.tar.gz
We've been using imagePullSecrets successfully on previous version (1.13.3), but the automatic upgrade to 1.14 both surprised me and seems to have broken the ability to pull from our private registry. (registry is using https://github.com/cesanta/docker_auth and registry:2)
this caused all of our microk8s installs to fail around 17 hours ago when the snap was released.
I checked this issue: containerd/cri#848 but we are using the modern syntax (dockerconfigjson) and haven't been having an issue prior to yesterday
The text was updated successfully, but these errors were encountered: