Skip to content

Commit dc96ecf

Browse files
committed
docs(air-gapped): address review comments for registry mirrors
- Fix containerd auth example: replace unsupported [host.*.auth] block with header-based Basic Auth per official hosts.toml format - Highlight global vs per-cluster secret precedence with warning block Assisted-By: Claude AI Signed-off-by: Kirill Ilin <[email protected]>
1 parent 0ca3e2f commit dc96ecf

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

‎content/en/docs/v1/install/kubernetes/air-gapped.md‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,28 @@ stringData:
329329
skip_verify = true
330330
```
331331

332-
If your registry mirrors require authentication, add an `[host.*.auth]` block:
332+
If your registry mirrors require authentication, add a custom `Authorization` header
333+
with Base64-encoded credentials:
333334

334335
```toml
335336
server = "https://registry-1.docker.io"
336337
[host."http://10.0.0.1:8082"]
337338
capabilities = ["pull", "resolve"]
338339
skip_verify = true
339-
[host."http://10.0.0.1:8082".auth]
340-
username = "myuser"
341-
password = "mypass"
340+
[host."http://10.0.0.1:8082".header]
341+
Authorization = "Basic bXl1c2VyOm15cGFzcw=="
342342
```
343343

344+
To generate the Base64-encoded value, run:
345+
346+
```bash
347+
echo -n 'myuser:mypass' | base64
348+
```
349+
350+
For dynamic or token-based authentication (e.g., Docker Hub), use
351+
[Kubernetes image pull secrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
352+
instead of plaintext credentials.
353+
344354
### How it works
345355

346356
The `patch-containerd` secret from the `cozy-system` namespace is automatically copied
@@ -356,9 +366,9 @@ instead of using the global `patch-containerd` secret:
356366
- The tenant cluster must be deployed with a Kubernetes package version 0.23.1 or later, which is available since Cozystack 0.32.1.
357367
- Before deploying the tenant cluster, create a Kubernetes Secret named `kubernetes-<cluster-name>-patch-containerd` in the tenant cluster namespace, using the same format as the examples above.
358368

359-
If both the global `patch-containerd` secret and a per-cluster secret exist,
360-
the global secret is used. To use per-cluster configuration only,
361-
do not create the global `patch-containerd` secret in `cozy-system`.
369+
{{% alert color="warning" %}}
370+
**Important:** If both the global `patch-containerd` secret and a per-cluster secret exist, the global secret takes precedence and the per-cluster secret is ignored. To use a per-cluster configuration, ensure that the global `patch-containerd` secret in the `cozy-system` namespace is not present.
371+
{{% /alert %}}
362372

363373
To learn more about registry configuration values, read the [CRI Plugin configuration guide](
364374
https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration)

0 commit comments

Comments
 (0)