Git Product home page Git Product logo

Comments (2)

dereknola avatar dereknola commented on June 24, 2024

We should add this to docs as well

from k3s.

mdrahman-suse avatar mdrahman-suse commented on June 24, 2024

Validated on RC v1.29.3-rc1-k3s1

Environment and Configs

Ubuntu 22.04
Single server
  • config.yaml
write-kubeconfig-mode: 644
cluster-init: true
token: summerheat
node-name: server1
  • registries.yaml
mirrors:
  docker.io:
    endpoint:
      - https://registry.example.com
      - https://registry.example.com

Testing steps

  • Copy config and registries file
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
$ sudo cp registries.yaml /etc/rancher/k3s
  • Install k3s
  • Ensure cluster is up
  • Check hosts.toml file
  • Check containerd log

Replication

$ k3s version v1.29.2+k3s1 (86f10213)
go version go1.21.7

$ sudo cat /var/lib/rancher/k3s/agent/etc/containerd/certs.d/docker.io/hosts.toml
# File generated by k3s. DO NOT EDIT.
server = "https://registry-1.docker.io/v2"

[host."https://registry.example.com/v2"]
  capabilities = ["pull", "resolve"]
[host."https://registry.example.com/v2"]
  capabilities = ["pull", "resolve"]

$ sudo less /var/lib/rancher/k3s/agent/containerd/containerd.log | grep 'duplicated'
time="2024-03-21T21:19:53.083899708Z" level=error msg="failed to decode hosts.toml" error="failed to parse TOML: (6, 2): duplicated tables"
...

Validation

$ k3s -v
k3s version v1.29.3-rc1+k3s1 (8aecc26b)
go version go1.21.8

$ sudo cat /var/lib/rancher/k3s/agent/etc/containerd/certs.d/docker.io/hosts.toml
# File generated by k3s. DO NOT EDIT.

server = "https://registry-1.docker.io/v2"
capabilities = ["pull", "resolve", "push"]



[host."https://registry.example.com/v2"]
  capabilities = ["pull", "resolve"]

$ sudo less /var/lib/rancher/k3s/agent/containerd/containerd.log | grep 'duplicated'
$
  • Also validated on upgrade

from k3s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.