Hey All! Im using my <docker.io> username to auth...
# k3s
w
Hey All! Im using my docker.io username to authenticate to docker.io registry, mainly to increase the pull limit threshold. The only way I found achieving that was to add this to the
/etc/rancher/k3s/registries.yaml
file:
Copy code
configs:
  "registry-1.docker.io":
    auth:
      username: my_user
      password: my_token
This results in
config.toml
having the following:
Copy code
[plugins.'io.containerd.cri.v1.images'.registry.configs.'registry-1.docker.io'.auth]
  username = "my_user"
  password = "my_token"
The thing is that the
configs
property is deprecated, and will be removed in future releases of containerd:
Copy code
# ctr c ls
WARN[0000] DEPRECATION: The `configs` property of `[plugins."io.containerd.grpc.v1.cri".registry]` is deprecated since containerd v1.5 and will be removed in containerd v2.1.Use `config_path` instead.
I found many tickets that refer to using
config_path
which were resolved but I can see that the code still sets user/pass authentication in the configs property instead of the
hosts.toml
of the registry (where tls auth config is included). Before creating an issue, I was wondering if this is the right way to authenticate with docker.io using k3s?
c
They keep threatening to remove it but they have not yet provided any other way to pass registry credentials. And it is not actually removed from 2.1 as far as I know.
So, just deal with the warning. Or use Kubernetes image pull secrets instead.
w
Got it. thank you! So this is something you will address once it will be actually removed, when k3s release will be updating containerd?
c
If they ever actually provide a different method to pass credentials we will use that instead, yes
But they have not.
And they just keep changing the version in the warning message instead of adding a new way to pass credentials via config_path
😂 1
w
Thank you for the information
c