You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation/airgap.md
+37-18Lines changed: 37 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,35 +5,54 @@ weight: 60
5
5
6
6
You can install K3s in an air-gapped environment using two different methods. An air-gapped environment is any environment that is not directly connected to the Internet. You can either deploy a private registry and mirror docker.io, or you can manually deploy images such as for small clusters.
7
7
8
-
## Private Registry Method
8
+
## Load Images
9
9
10
-
This document assumes you have already created your nodes in your air-gap environment and have a Docker private registry on your bastion host.
10
+
### Private Registry Method
11
11
12
-
If you have not yet set up a private Docker registry, refer to the official documentation [here](https://docs.docker.com/registry/deploying/#run-an-externally-accessible-registry).
12
+
These steps assume you have already created nodes in your air-gap environment,
13
+
are using the bundled containerd as the container runtime,
14
+
and have a OCI-compliant private registry available in your environment.
13
15
14
-
### Create the Registry YAML
16
+
If you have not yet set up a private Docker registry, refer to the [official Registry documentation](https://docs.docker.com/registry/deploying/#run-an-externally-accessible-registry).
15
17
16
-
Follow the [Private Registry Configuration](private-registry.md) guide to create and configure the registry.yaml file.
18
+
#### Create the Registry YAML and Push Images
17
19
18
-
Once you have completed this, you may now go to the [Install K3s](#install-k3s) section below.
20
+
1. Obtain the images archive for your architecture from the [releases](https://github.com/k3s-io/k3s/releases) page for the version of K3s you will be running.
21
+
2. Use `docker image load k3s-airgap-images-amd64.tar.zst` to import images from the tar file into docker.
22
+
3. Use `docker tag` and `docker push` to retag and push the loaded images to your private registry.
23
+
4. Follow the [Private Registry Configuration](private-registry.md) guide to create and configure the `registries.yaml` file.
24
+
5. Proceed to the [Install K3s](#install-k3s) section below.
19
25
26
+
### Manually Deploy Images Method
20
27
21
-
## Manually Deploy Images Method
28
+
These steps assume you have already created nodes in your air-gap environment,
29
+
are using the bundled containerd as the container runtime,
30
+
and cannot or do not want to use a private registry.
22
31
23
-
We are assuming you have created your nodes in your air-gap environment and use containerd as container runtime.
24
-
This method requires you to manually deploy the necessary images to each node and is appropriate for edge deployments where running a private registry is not practical.
32
+
This method requires you to manually deploy the necessary images to each node, and is appropriate for edge deployments where running a private registry is not practical.
25
33
26
-
### Prepare the Images Directory and K3s Binary
27
-
Obtain the images tar file for your architecture from the [releases](https://github.com/k3s-io/k3s/releases) page for the version of K3s you will be running.
34
+
#### Prepare the Images Directory and Airgap Image Tarball
28
35
29
-
Place the tar file in the `images` directory, for example:
36
+
1. Obtain the images archive for your architecture from the [releases](https://github.com/k3s-io/k3s/releases) page for the version of K3s you will be running.
37
+
2. Download the imagess archive to the agent's images directory, for example:
The Embedded Registry Mirror is available as an experimental feature as of January 2024 releases: v1.26.13+k3s1, v1.27.10+k3s1, v1.28.6+k3s1, v1.29.1+k3s1
48
+
:::
49
+
50
+
K3s includes an embedded distributed OCI-compliant registry mirror.
51
+
When enabled and properly configured, images available in the containerd image store on any node
52
+
can be pulled by other cluster members without access to an external image registry.
35
53
36
-
Once you have completed this, you may now go to the [Install K3s](#install-k3s) section below.
54
+
The mirrored images may be sourced from an upstream registry, registry mirror, or airgap image tarball.
55
+
For more information on enabling the embedded distributed registry mirror, see the [Embedded Registry Mirror](./registry-mirror.md) documentation.
K3s additionally provides a `--resolv-conf` flag for kubelets, which may help with configuring DNS in air-gap networks.
141
+
K3s's `--resolv-conf` flag is passed through to the kubelet, which may help with configuring pod DNS resolution in air-gap networks where the host does not have upstream nameservers configured.
Copy file name to clipboardExpand all lines: docs/installation/network-options.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,11 @@ K3s no longer includes strongSwan `swanctl` and `charon` binaries starting with
35
35
36
36
:::
37
37
38
-
####Migrating from `wireguard` or `ipsec` to `wireguard-native`
38
+
### Migrating from `wireguard` or `ipsec` to `wireguard-native`
39
39
40
-
The legacy `wireguard` backend requires installation of the `wg` tool on the host. This backend will be removed in K3s v1.26, in favor of `wireguard-native` backend, which directly interfaces with the kernel.
40
+
The legacy `wireguard` backend requires installation of the `wg` tool on the host. This backend is not available in K3s v1.26 and higher, in favor of `wireguard-native` backend, which directly interfaces with the kernel.
41
41
42
-
The legacy `ipsec` backend requires installation of the `swanctl` and `charon` binaries on the host. This backend will be removed in K3s v1.27, in favor of the `wireguard-native` backend.
42
+
The legacy `ipsec` backend requires installation of the `swanctl` and `charon` binaries on the host. This backend is not available in K3s v1.27 and higher, in favor of the `wireguard-native` backend.
43
43
44
44
We recommend that users migrate to the new backend as soon as possible. The migration requires a short period of downtime while nodes come up with the new configuration. You should follow these two steps:
45
45
@@ -120,14 +120,16 @@ K3s agents and servers maintain websocket tunnels between nodes that are used to
120
120
This allows agents to operate without exposing the kubelet and container runtime streaming ports to incoming connections, and for the control-plane to connect to cluster services when operating with the agent disabled.
121
121
This functionality is equivalent to the [Konnectivity](https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/) service commonly used on other Kubernetes distributions, and is managed via the apiserver's egress selector configuration.
122
122
123
+
The default mode is `agent`. `pod` or `cluster` modes are recommended when running [agentless servers](../advanced.md#running-agentless-servers-experimental), in order to provide the apiserver with access to cluster service endpoints in the absence of flannel and kube-proxy.
124
+
123
125
The egress selector mode may be configured on servers via the `--egress-selector-mode` flag, and offers four modes:
124
126
*`disabled`: The apiserver does not use agent tunnels to communicate with kubelets or cluster endpoints.
125
127
This mode requires that servers run the kubelet, CNI, and kube-proxy, and have direct connectivity to agents, or the apiserver will not be able to access service endpoints or perform `kubectl exec` and `kubectl logs`.
126
128
*`agent` (default): The apiserver uses agent tunnels to communicate with kubelets.
127
129
This mode requires that the servers also run the kubelet, CNI, and kube-proxy, or the apiserver will not be able to access service endpoints.
128
-
*`pod`: The apiserver uses agent tunnels to communicate with kubelets and service endpoints, routing endpoint connections to the correct agent by watching Nodes.
129
-
**NOTE**: This will not work when using a CNI that uses its own IPAM and does not respect the node's PodCIDR allocation. `cluster` or `agent` should be used with these CNIs instead.
130
-
*`cluster`: The apiserver uses agent tunnels to communicate with kubelets and service endpoints, routing endpoint connections to the correct agent by watching Endpoints.
130
+
*`pod`: The apiserver uses agent tunnels to communicate with kubelets and service endpoints, routing endpoint connections to the correct agent by watching Nodes and Endpoints.
131
+
**NOTE**: This mode will not work when using a CNI that uses its own IPAM and does not respect the node's PodCIDR allocation. `cluster` or `agent` mode should be used with these CNIs instead.
132
+
*`cluster`: The apiserver uses agent tunnels to communicate with kubelets and service endpoints, routing endpoint connections to the correct agent by watching Pods and Endpoints. This mode has the highest portability across different cluster configurations, at the cost of increased overhead.
0 commit comments