Skip to content

Commit 88212fb

Browse files
committed
docs: adds documentation about nodeadm
1 parent d657f69 commit 88212fb

File tree

2 files changed

+133
-1
lines changed

2 files changed

+133
-1
lines changed

docs/book/src/topics/eks/cluster-upgrades.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,81 @@
44

55
Upgrading the Kubernetes version of the control plane is supported by the provider. To perform an upgrade you need to update the `version` in the spec of the `AWSManagedControlPlane`. Once the version has changed the provider will handle the upgrade for you.
66

7-
You can only upgrade a EKS cluster by 1 minor version at a time. If you attempt to upgrade the version by more then 1 minor version the provider will ensure the upgrade is done in multiple steps of 1 minor version. For example upgrading from v1.15 to v1.17 would result in your cluster being upgraded v1.15 -> v1.16 first and then v1.16 to v1.17.
7+
You can only upgrade a EKS cluster by 1 minor version at a time. If you attempt to upgrade the version by more then 1 minor version the provider will ensure the upgrade is done in multiple steps of 1 minor version. For example upgrading from v1.15 to v1.17 would result in your cluster being upgraded v1.15 -> v1.16 first and then v1.16 to v1.17.
8+
9+
## Upgrading Nodes from AL2 (EKSConfig) to AL2023 (NodeadmConfig)
10+
11+
Amazon Linux 2 (AL2) AMIs are only supported up to Kubernetes v1.32. To upgrade cluster nodes to v1.33 or newer, you **must** migrate them to Amazon Linux 2023 (AL2023) AMIs. This migration also requires changing the bootstrap provider from `EKSConfig` to the new `NodeadmConfig`.
12+
13+
The upgrade process follows the standard Cluster API rolling update strategy. You will create a new bootstrap template (using `NodeadmConfigTemplate`) and update your `MachineDeployment` or `MachinePool` to reference it, along with the new Kubernetes version and an AL2023-based AMI.
14+
15+
### MachineDeployment Upgrade Example
16+
17+
Here is an example of upgrading a `MachineDeployment` from Kubernetes v1.32 (using `EKSConfig`) to v1.33 (using `NodeadmConfig`).
18+
19+
**Before (v1.32 with `EKSConfigTemplate`):**
20+
21+
```yaml
22+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
23+
kind: EKSConfigTemplate
24+
metadata:
25+
name: default132
26+
spec:
27+
template:
28+
spec:
29+
postBootstrapCommands:
30+
- "echo \"bye world\""
31+
---
32+
apiVersion: cluster.x-k8s.io/v1beta1
33+
kind: MachineDeployment
34+
metadata:
35+
name: default
36+
spec:
37+
clusterName: default
38+
template:
39+
spec:
40+
bootstrap:
41+
configRef:
42+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
43+
kind: EKSConfigTemplate
44+
name: default132
45+
infrastructureRef:
46+
kind: AWSMachineTemplate
47+
name: default132
48+
version: v1.32.0
49+
```
50+
51+
After (v1.33 with NodeadmConfigTemplate):
52+
53+
A new NodeadmConfigTemplate is created, and the MachineDeployment is updated to reference it and the new version.
54+
YAML
55+
56+
```yaml
57+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
58+
kind: NodeadmConfigTemplate
59+
metadata:
60+
name: default
61+
spec:
62+
template:
63+
spec:
64+
preNodeadmCommands:
65+
- "echo \"hello world\""
66+
---
67+
apiVersion: cluster.x-k8s.io/v1beta1
68+
kind: MachineDeployment
69+
metadata:
70+
name: default
71+
spec:
72+
clusterName: default
73+
template:
74+
spec:
75+
bootstrap:
76+
configRef:
77+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
78+
kind: NodeadmConfigTemplate
79+
name: default
80+
infrastructureRef:
81+
kind: AWSMachineTemplate
82+
name: default
83+
version: v1.33.0
84+
```

docs/book/src/topics/eks/creating-a-cluster.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,61 @@ NOTE: When creating an EKS cluster only the **MAJOR.MINOR** of the `-kubernetes-
1717
By default CAPA relies on the default EKS cluster upgrade policy, which at the moment of writing is EXTENDED support.
1818
See more info about [cluster upgrade policy](https://docs.aws.amazon.com/eks/latest/userguide/view-upgrade-policy.html)
1919

20+
## Choosing a Bootstrap Provider: EKSConfig vs. NodeadmConfig
21+
22+
With the introduction of Amazon Linux 2023 (AL2023), the bootstrapping method for EKS nodes has changed. Cluster API Provider AWS (CAPA) supports two bootstrap providers for EKS:
23+
24+
1. **`EKSConfig`**: The original bootstrap provider. It uses the legacy `bootstrap.sh` script and is intended for use with **Amazon Linux 2 (AL2)** AMIs.
25+
2. **`NodeadmConfig`**: The new bootstrap provider. It uses the modern `nodeadm` tool and is **required** for **Amazon Linux 2023 (AL2023)** AMIs.
26+
27+
### When to use which provider
28+
29+
The provider you must use depends on the Amazon Machine Image (AMI) and Kubernetes version you are targeting. Amazon Linux 2 AMIs are only supported for Kubernetes v1.32 and older.
30+
31+
| Bootstrap Provider | AMI Type | Kubernetes Version |
32+
| --- | --- | --- |
33+
| `EKSConfig` | Amazon Linux 2 (AL2) | $\le$ v1.32 |
34+
| `NodeadmConfig` | Amazon Linux 2023 (AL2023) | $\ge$ v1.33 |
35+
36+
When you generate a cluster, you will need to ensure your `MachineDeployment` or `MachinePool` references the correct bootstrap template `kind`.
37+
38+
**For AL2 / K8s $\le$ v1.32, use `EKSConfigTemplate`:**
39+
```yaml
40+
apiVersion: cluster.x-k8s.io/v1beta1
41+
kind: MachineDeployment
42+
metadata:
43+
name: default
44+
spec:
45+
template:
46+
spec:
47+
bootstrap:
48+
configRef:
49+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
50+
kind: EKSConfigTemplate # <-- Uses bootstrap.sh
51+
name: default-132
52+
version: v1.32.0
53+
```
54+
55+
### Secrets Manager
56+
57+
Amazon Linux 2023 does not have the proper tooling to use the secrets manager flow for bootstrapping. Therefore, whenever creating `AWSMachineTemplate` objects `insecureSkipSecretsManager` must be set to false
58+
59+
```yaml
60+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
61+
kind: AWSMachineTemplate
62+
metadata:
63+
name: default
64+
spec:
65+
template:
66+
spec:
67+
cloudInit:
68+
insecureSkipSecretsManager: true
69+
ami:
70+
eksLookupType: AmazonLinux2023
71+
iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
72+
instanceType: m5a.16xlarge
73+
```
74+
2075
## Kubeconfig
2176

2277
When creating an EKS cluster 2 kubeconfigs are generated and stored as secrets in the management cluster. This is different to when you create a non-managed cluster using the AWS provider.

0 commit comments

Comments
 (0)