Files
provider-kairos/internal/role
Dimitris Karakasilis e88f724d19 3100 fix embedded registry config (#812)
Part of: https://github.com/kairos-io/kairos/issues/3100
fixing the manual setup case.

A config similar to this should now work:

master:

```yaml
hostname: metal-{{ trunc 4 .MachineID }}
users:
- name: kairos # Change to your own user
  passwd: kairos # Change to your own password
  groups:
    - admin # This user needs to be part of the admin group


k3s:
  enabled: true
  embedded_registry: true

stages:
  boot:
    - name: "Add registries configuration for k3s/spegel"
      files:
        - path: /etc/rancher/k3s/registries.yaml
          content: |
            mirrors:
              "*":
```

worker:

```yaml
#cloud-config

hostname: metal-{{ trunc 4 .MachineID }}
users:
- name: kairos # Change to your own user
  passwd: kairos # Change to your own password
  groups:
    - admin # This user needs to be part of the admin group

k3s-agent: # Warning: the key is different from the master node one
  enabled: true
  args:
    - --with-node-id # will configure the agent to use the node ID to communicate with the master node
  env:
    K3S_TOKEN: "<token-from-master-/var/lib/rancher/k3s/server/node-token"
    K3S_URL: https://<master-ip-address-here>:6443 # Same IP that you use to log into your master node

stages:
  boot:
    - name: "Add registries configuration for k3s/spegel"
      files:
        - path: /etc/rancher/k3s/registries.yaml
          content: |
            mirrors:
              "*":
```

documentation:
https://docs.k3s.io/installation/registry-mirror#enabling-registry-mirroring

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2025-08-06 17:15:47 +03:00
..
2023-10-27 12:32:00 +03:00