Skip to content

Commit 3861b10

Browse files
sayanchowdhurymboersma
authored andcommitted
docs: Add the documentation for flatcar-sysext
Co-authored-by: Matt Boersma <[email protected]> Signed-off-by: Sayan Chowdhury <[email protected]> Signed-off-by: Mathieu Tortuyaux <[email protected]>
1 parent 0c40781 commit 3861b10

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

docs/book/src/self-managed/flatcar.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,36 @@
22

33
## Overview
44

5-
CAPZ enables you to create Kubernetes clusters using Flatcar Container Linux on Microsoft Azure.
5+
CAPZ enables you to create Kubernetes clusters using Flatcar Container Linux on Microsoft Azure. Flatcar Container Linux comes in two flavors:
66

7-
### Image creation
7+
### The `flatcar-sysext` flavor (**recommended**)
8+
9+
This variant relies on a vanilla Flatcar Community Gallery image which leverages the [systemd-sysext](https://www.flatcar.org/docs/latest/provisioning/sysext/) feature to install and update Kubernetes components. The Kubernetes version is not bound to the Flatcar version (i.e. Flatcar can be upgraded independently from Kubernetes and vice versa).
10+
11+
The template comes with a [systemd-sysupdate](https://www.freedesktop.org/software/systemd/man/latest/sysupdate.d.html) configuration file that will download each new patch version of Kubernetes (i.e. if you start with Kubernetes 1.x.y, systemd-sysupdate will automatically pull 1.x.y+1 but not 1.x+1.y). Please note that this behavior is disabled by default. To enable the Kubernetes auto-update you can:
12+
* Update the template to enable the `systemd-sysupdate.timer`
13+
* Or run the following command on the nodes: `sudo systemctl enable --now systemd-sysupdate.timer`
14+
15+
When the Kubernetes release reaches end-of-life it will not receive updates anymore. To switch to a new major version, do a `sudo rm /etc/sysupdate.kubernetes.d/kubernetes-*.conf` and download the new update config into the folder with `cd /etc/sysupdate.kubernetes.d && sudo wget https://github.com/flatcar/sysext-bakery/releases/download/latest/kubernetes-${KUBERNETES_VERSION%.*}.conf`.
16+
17+
To coordinate the node reboot, we recommend using [Kured](https://github.com/kubereboot/kured). Note that running `kubeadm upgrade apply` on the first controller and `kubeadm upgrade node` on all other nodes is not automated (yet): see the [docs](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/).
18+
19+
Find the latest published images:
20+
```console
21+
az sig image-version list --gallery-image-definition flatcar-stable-amd64 --gallery-name flatcar --resource-group flatcar-image-gallery-publishing -o table
22+
Location Name ProvisioningState ResourceGroup
23+
---------- -------- ------------------- --------------------------------
24+
westeurope 3374.2.0 Succeeded flatcar-image-gallery-publishing
25+
westeurope 3374.2.1 Succeeded flatcar-image-gallery-publishing
26+
westeurope 3374.2.3 Succeeded flatcar-image-gallery-publishing
27+
....
28+
```
29+
30+
### The `flatcar` flavor
31+
32+
This variant relies on a Flatcar image built using the image-builder project. The Kubernetes version is bound to the Flatcar version and a rebuild of the image is required for each Kubernetes or Flatcar upgrade.
33+
34+
#### Image creation
835

936
The testing reference images are built using [image-builder](https://github.com/kubernetes-sigs/image-builder) by Flatcar maintainers and published to the Flatcar CAPI Community Gallery on Azure with community gallery name `flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0`.
1037

@@ -21,7 +48,7 @@ The reference images should not be used in a production environment. It is highl
2148
Find the latest published images:
2249

2350
```console
24-
$ az sig image-definition list-community --location westeurope --public-gallery-name flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0 --only-show-errors
51+
$ az sig image-definition list-community --location westeurope --public-gallery-name flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0 --only-show-errors -o table
2552
HyperVGeneration Location Name OsState OsType UniqueId
2653
------------------ ---------- ---------------------------------- ----------- -------- ---------------------------------------------------------------------------------------------------------------
2754
V2 westeurope flatcar-stable-amd64-capi-v1.23.13 Generalized Linux /CommunityGalleries/flatcar4capi-742ef0cb-dcaa-4ecb-9cb0-bfd2e43dccc0/Images/flatcar-stable-amd64-capi-v1.23.13
@@ -36,9 +63,13 @@ False westeurope 3227.2.3 2022-12-09T18:05:58.830464+00:00 /Co
3663

3764
If you would like customize your images please refer to the documentation on building your own [custom images](custom-images.md).
3865

66+
3967
## Trying it out
4068

41-
To create a cluster using Flatcar Container Linux, use `flatcar` cluster flavor.
69+
To create a cluster using Flatcar Container Linux, use `flatcar` or `flatcar-sysext` cluster flavor.
4270

4371
- Note: When working with **Flatcar machines**, append `--set-string cloudControllerManager.caCertDir=/usr/share/ca-certificates` to the `cloud-provider-azure` _helm_ command. Refer ["External Cloud Provider's Note for flatcar-flavored machine"](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/764aa1e8bd02d150dff90ff6bc7f8daa2b38810f/docs/book/src/topics/addons.md#external-cloud-provider)
44-
- However, no changes are needed when using tilt to bring up flatcar-flavored workload clusters.
72+
- However, no changes are needed when using tilt to bring up Flatcar workload clusters.
73+
74+
75+

0 commit comments

Comments
 (0)