diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-31 15:22:46 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-31 15:22:46 +0300 |
| commit | 6ff10a29ce04d2e603eac3e5bdd539affc42bdf9 (patch) | |
| tree | ce5efe743d65c100573626cff196c45a9523612e | |
| parent | e3df76d0532147462e1f873489798ec882bb56a4 (diff) | |
more on this
| -rw-r--r-- | f3s/registry/README.md | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/f3s/registry/README.md b/f3s/registry/README.md index 591f244..ef70013 100644 --- a/f3s/registry/README.md +++ b/f3s/registry/README.md @@ -50,10 +50,22 @@ And afterwards I could push the anky-sync-server image. ## K3s Configuration -To use the private registry from within the k3s cluster, you need to configure each k3s node to trust the insecure registry. This is done by creating a `registries.yaml` file in `/etc/rancher/k3s/` on each node. +To use the private registry from within the k3s cluster, you need to configure each k3s node. -The following command will create the file and restart the k3s service: +### 1. Update /etc/hosts +On each k3s node, you must ensure that `registry.lan.buetow.org` resolves to the node's loopback address. You can do this by adding an entry to the `/etc/hosts` file. + +Run the following command, which will add the entry to `r0`, `r1`, and `r2`: +```bash +for node in r0 r1 r2; do ssh root@$node "echo '127.0.0.1 registry.lan.buetow.org' >> /etc/hosts"; done +``` + +### 2. Configure K3s to trust the insecure registry +You need to configure each k3s node to trust the insecure registry. This is done by creating a `registries.yaml` file in `/etc/rancher/k3s/` on each node. + +The following command will create the file and restart the k3s service. You will need to run this for each node (`r0`, `r1`, `r2`): ```bash ssh root@<node> "echo -e 'mirrors:\n "registry.lan.buetow.org:30001":\n endpoint:\n - "http://localhost:30001"' > /etc/rancher/k3s/registries.yaml && systemctl restart k3s" ``` + |
