containerd / cri

Moved to https://github.com/containerd/containerd/tree/master/pkg/cri . If you wish to submit issues/PRs, please submit to https://github.com/containerd/containerd
https://github.com/containerd/containerd/tree/master/pkg/cri
Apache License 2.0
900 stars 348 forks source link

Help need to add a private registry to containerd / k3s #1616

Closed docfactory37 closed 3 years ago

docfactory37 commented 3 years ago

Hi All,

i have deplyed k3s with containerd backend and i have a Nexus private registry on http.

i have been able to locate this doc https://github.com/containerd/cri/blob/master/docs/registry.md

and i have add the below to /etc/containerd/config.toml

# Config file is parsed as version 1 by default.
# To use the long form of plugin names set "version = 2"
# explicitly use v2 config format
version = 2

[plugin."io.containerd.grpc.v1.cri".registry.mirrors]
  [plugin."io.containerd.grpc.v1.cri".registry.mirrors."test.http-registry.io"]
    endpoint = ["http://<<IP>>:32000"]
[plugin."io.containerd.grpc.v1.cri".registry.configs."test.http-registry.io".tls]
  insecure_skip_verify = true
failed to resolve reference "<<IP>>:32000/prod/jacket:1": failed to do request: Head "https://<<IP>>:32000/v2/prod/jacket/manifests/1": http: server gave HTTP response to HTTPS client

helping someone will be able to help me to get it to work.

mikebrow commented 3 years ago

Please run containerd with debug on "containerd -l debug" and check the log to find out why it didn't connect via http.. it adds a default to the endpoint list for https and reports that result. Would need a PR to get it to report both failures.

docfactory37 commented 3 years ago

@mikebrow I have been able to get this working