Skip to content

Commit 4510500

Browse files
authored
Use tabs and guide structure for airgap install page (#434)
* Use tabs and guide structure for airgap install page Signed-off-by: Derek Nola <derek.nola@suse.com> * Bump theme-common Signed-off-by: Derek Nola <derek.nola@suse.com> * Fix anchor links Signed-off-by: Derek Nola <derek.nola@suse.com> --------- Signed-off-by: Derek Nola <derek.nola@suse.com>
1 parent ddabbb2 commit 4510500

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

docs/installation/airgap.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
title: "Air-Gap Install"
33
---
44

5-
K3s can be installed in an air-gapped environment with two different methods. You can either deploy images via the [k3s-airgap-images tarball release artifact](#manually-deploy-images-method) or by using a [private registry](#private-registry-method). It is also possible to use the [embedded registry mirror](#embedded-registry-mirror) as long as there is at least one cluster member that has access to the required images.
5+
This guide walks you through installing K3s in an air-gapped environment using a three-step process.
66

7+
## 1. Load Images
78

8-
## Load Images
9+
Each image loading method has different requirements and is suited for different air-gapped scenarios. Choose the method that best fits your infrastructure and security requirements.
910

10-
### Private Registry Method
11+
<Tabs queryString="airgap-load-images">
12+
<TabItem value="Private Registry Method">
1113

1214
These steps assume you have already created nodes in your air-gap environment,
1315
are using the bundled containerd as the container runtime,
@@ -21,9 +23,10 @@ If you have not yet set up a private Docker registry, refer to the [official Reg
2123
2. Use `docker image load k3s-airgap-images-amd64.tar.zst` to import images from the tar file into docker.
2224
3. Use `docker tag` and `docker push` to retag and push the loaded images to your private registry.
2325
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.
26+
5. Proceed to the [Install K3s](#2-install-k3s) section below.
2527

26-
### Manually Deploy Images Method
28+
</TabItem>
29+
<TabItem value="Manually Deploy Images">
2730

2831
These steps assume you have already created nodes in your air-gap environment,
2932
are using the bundled containerd as the container runtime,
@@ -39,7 +42,7 @@ This method requires you to manually deploy the necessary images to each node, a
3942
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
4043
sudo curl -L -o /var/lib/rancher/k3s/agent/images/k3s-airgap-images-amd64.tar.zst "https://github.com/k3s-io/k3s/releases/download/v1.33.1%2Bk3s1/k3s-airgap-images-amd64.tar.zst"
4144
```
42-
3. Proceed to the [Install K3s](#install-k3s) section below.
45+
3. Proceed to the [Install K3s](#2-install-k3s) section below.
4346

4447
#### Enable Conditional Image Imports
4548

@@ -64,7 +67,8 @@ When this feature is enabled, it will not be possible to ensure that all images
6467
:::
6568

6669

67-
### Embedded Registry Mirror
70+
</TabItem>
71+
<TabItem value="Embedded Registry Mirror">
6872

6973
K3s includes an embedded distributed OCI-compliant registry mirror.
7074
When enabled and properly configured, images available in the containerd image store on any node
@@ -73,11 +77,14 @@ can be pulled by other cluster members without access to an external image regis
7377
The mirrored images may be sourced from an upstream registry, registry mirror, or airgap image tarball.
7478
For more information on enabling the embedded distributed registry mirror, see the [Embedded Registry Mirror](./registry-mirror.md) documentation.
7579

76-
## Install K3s
80+
</TabItem>
81+
</Tabs>
82+
83+
## 2. Install K3s
7784

7885
### Prerequisites
7986

80-
Before installing K3s, complete the [Private Registry Method](#private-registry-method) or the [Manually Deploy Images Method](#manually-deploy-images-method) above to prepopulate the images that K3s needs to install.
87+
Before installing K3s, choose one of the [Load Images](#1-load-images) options above to prepopulate the images that K3s needs to install.
8188

8289
#### Binaries
8390
- Download the K3s binary from the [releases](https://github.com/k3s-io/k3s/releases) page, matching the same version used to get the airgap images. Place the binary in `/usr/local/bin` on each air-gapped node and ensure it is executable.
@@ -109,11 +116,11 @@ sudo yum install ./k3s-selinux-1.4-1.el8.noarch.rpm
109116

110117
See the [SELinux](../advanced.md#selinux-support) section for more information.
111118

112-
### Installing K3s in an Air-Gapped Environment
119+
### Running Install Script
113120

114121
You can install K3s on one or more servers as described below.
115122

116-
<Tabs queryString="airgap-cluster">
123+
<Tabs queryString="airgap-install">
117124
<TabItem value="Single Server Configuration" default>
118125

119126
To install K3s on a single server, simply do the following on the server node:
@@ -128,10 +135,6 @@ To add additional agents, do the following on each agent node:
128135
INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://<SERVER_IP>:6443 K3S_TOKEN=<YOUR_TOKEN> ./install.sh
129136
```
130137

131-
:::note
132-
The token from the server is typically found at `/var/lib/rancher/k3s/server/token`.
133-
:::
134-
135138
</TabItem>
136139
<TabItem value="High Availability Configuration" default>
137140

@@ -160,9 +163,10 @@ K3S_DATASTORE_ENDPOINT='mysql://username:password@tcp(hostname:3306)/database-na
160163
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.
161164
:::
162165

163-
## Upgrading
166+
## 3. Upgrading
164167

165-
### Install Script Method
168+
<Tabs queryString="airgap-upgrade">
169+
<TabItem value="Manual Upgrade">
166170

167171
Upgrading an air-gap environment can be accomplished in the following manner:
168172

@@ -172,18 +176,21 @@ node. Delete the old tar file.
172176
with the same environment variables.
173177
3. Restart the K3s service (if not restarted automatically by installer).
174178

175-
176-
### Automated Upgrades Method
179+
</TabItem>
180+
<TabItem value="Automated Upgrade">
177181

178182
K3s supports [automated upgrades](../upgrades/automated.md). To enable this in air-gapped environments, you must ensure the required images are available in your private registry.
179183

180184
You will need the version of rancher/k3s-upgrade that corresponds to the version of K3s you intend to upgrade to. Note, the image tag replaces the `+` in the K3s release with a `-` because Docker images do not support `+`.
181185

182-
You will also need the versions of system-upgrade-controller and kubectl that are specified in the system-upgrade-controller manifest YAML that you will deploy. Check for the latest release of the system-upgrade-controller [here](https://github.com/rancher/system-upgrade-controller/releases/latest) and download the system-upgrade-controller.yaml to determine the versions you need to push to your private registry. For example, in release v0.4.0 of the system-upgrade-controller, these images are specified in the manifest YAML:
186+
You will also need the versions of system-upgrade-controller and kubectl that are specified in the system-upgrade-controller manifest YAML that you will deploy. Check for the latest release of the system-upgrade-controller [here](https://github.com/rancher/system-upgrade-controller/releases/latest) and download the system-upgrade-controller.yaml to determine the versions you need to push to your private registry. For example, in release v0.15.2 of the system-upgrade-controller, these images are specified in the manifest YAML:
183187

184188
```
185-
rancher/system-upgrade-controller:v0.4.0
186-
rancher/kubectl:v0.17.0
189+
rancher/system-upgrade-controller:v0.15.2
190+
rancher/kubectl:v1.30.3
187191
```
188192

189193
Once you have added the necessary rancher/k3s-upgrade, rancher/system-upgrade-controller, and rancher/kubectl images to your private registry, follow the [automated upgrades](../upgrades/automated.md) guide.
194+
195+
</TabItem>
196+
</Tabs>

docs/installation/registry-mirror.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ This option enables the embedded mirror for use on all nodes in the cluster.
1616
When enabled at a cluster level, all nodes will host a local OCI registry on port 6443,
1717
and publish a list of available images via a peer to peer network on port 5001.
1818
Any image available in the containerd image store on any node, can be pulled by other cluster members without access to an external registry.
19-
Images imported via [air-gap image tar files](./airgap.md#manually-deploy-images-method) are pinned in containerd to
19+
<!-- Note: Not a regular markdown header because it exists inside a Tabs structure, access it via queryString-->
20+
Images imported via [air-gap image tar files](./airgap.md?airgap-load-images=Manually+Deploy+Images) are pinned in containerd to
2021
ensure that they remain available and are not pruned by Kubelet garbage collection.
2122

2223
The peer to peer port can changed from 5001 by setting the `K3S_P2P_PORT` environment variable for the K3s service. The port must be set to the same value on all nodes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@docusaurus/core": "^3.8.1",
1818
"@docusaurus/plugin-client-redirects": "^3.8.1",
1919
"@docusaurus/preset-classic": "^3.8.1",
20-
"@docusaurus/theme-common": "^3.7.0",
20+
"@docusaurus/theme-common": "^3.8.1",
2121
"@docusaurus/theme-mermaid": "^3.8.1",
2222
"@easyops-cn/docusaurus-search-local": "^0.51.0",
2323
"@mdx-js/react": "3.1.0",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@
19671967
tslib "^2.6.0"
19681968
utility-types "^3.10.0"
19691969

1970-
"@docusaurus/theme-common@3.8.1", "@docusaurus/theme-common@^3.7.0":
1970+
"@docusaurus/theme-common@3.8.1", "@docusaurus/theme-common@^3.8.1":
19711971
version "3.8.1"
19721972
resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.8.1.tgz#17c23316fbe3ee3f7e707c7298cb59a0fff38b4b"
19731973
integrity sha512-UswMOyTnPEVRvN5Qzbo+l8k4xrd5fTFu2VPPfD6FcW/6qUtVLmJTQCktbAL3KJ0BVXGm5aJXz/ZrzqFuZERGPw==

0 commit comments

Comments
 (0)