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/book/src/topics/external-cloud-provider-with-ebs-csi-driver.md
+122-6Lines changed: 122 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,32 @@
1
-
# External AWS cloud provider with AWS EBS CSI driver
1
+
# External AWS Cloud Provider and AWS CSI Driver
2
2
3
3
## Overview
4
-
From Kubernetes 1.21 onwards, the support for its in-tree AWS cloud provider and the EBS CSI driver is removed, hence there is a need to use [out-of-tree cloud provider (Cloud Controller Manager - CCM) ](https://github.com/kubernetes/cloud-provider-aws) and a CSI driver in CAPA.
5
-
For details, see [Status of project and documentation of Cloud provider AWS](https://github.com/kubernetes/cloud-provider-aws/issues/42)
4
+
The support for in-tree cloud providers and the CSI drivers is coming to an end and CAPA supports various upgrade paths
5
+
to use [external cloud provider (Cloud Controller Manager - CCM) ](https://github.com/kubernetes/cloud-provider-aws) and external CSI drivers.
6
+
This document explains how to create a CAPA cluster with external CSI/CCM plugins and how to upgrade existing clusters that rely on in-tree providers.
6
7
7
-
## Using external cloud provider and EBS CSI driver in AWS workloads
8
-
Once Management cluster is ready, install external CCM and EBS CSI driver onto the CAPA workload cluster either manually or using ClusterResourceSets (CRS).
8
+
9
+
## Creating clusters with external CSI/CCM and validating
10
+
For clusters that will use external CCM, `cloud-provider: external` flag needs to be set in KubeadmConfig resources in both `KubeadmControlPlane` and `MachineDeployment` resources.
11
+
12
+
clusterConfiguration:
13
+
apiServer:
14
+
extraArgs:
15
+
cloud-provider: external
16
+
controllerManager:
17
+
extraArgs:
18
+
cloud-provider: external
19
+
initConfiguration:
20
+
nodeRegistration:
21
+
kubeletExtraArgs:
22
+
cloud-provider: external
23
+
joinConfiguration:
24
+
nodeRegistration:
25
+
kubeletExtraArgs:
26
+
cloud-provider: external
27
+
28
+
29
+
External CCM and EBS CSI driver can be installed manually or using ClusterResourceSets (CRS) onto the CAPA workload cluster.
9
30
To install them with CRS, create a CRS resource on the management cluster with labels, for example `csi: external` and `ccm: external` labels.
10
31
Then, when creating `Cluster` objects for workload clusters that should have this CSR applied, create them with matching labels `csi: external` and `ccm: external` for CSI and CCM, respectively.
11
32
@@ -91,7 +112,7 @@ spec:
91
112
```
92
113
3. Once you apply the above manifest, the EBS volumes will be created and attached to the worker nodes.
93
114
94
-
>**IMPORTANT WARNING:** The CRDs from the AWS EBS CSI driver and AWS out-of-tree cloud provider gives issue while installing the respective controllers on the AWS Cluster, it doesn't allow statefulsets to create the volume on existing EC2 instance.
115
+
>**IMPORTANT WARNING:** The CRDs from the AWS EBS CSI driver and AWS external cloud provider gives issue while installing the respective controllers on the AWS Cluster, it doesn't allow statefulsets to create the volume on existing EC2 instance.
95
116
> We need the CSI controller deployment and CCM pinned to the control plane which has right permissions to create, attach
96
117
> and mount the volumes to EC2 instances. To achieve this, you should add the node affinity rules to the CSI driver controller deployment and CCM DaemonSet manifests.
97
118
> ```yaml
@@ -111,4 +132,99 @@ spec:
111
132
> - key: node-role.kubernetes.io/master
112
133
> operator: Exists
113
134
>```
135
+
136
+
137
+
## Validated upgrade paths for existing clusters
138
+
139
+
From Kubernetes 1.23 onwards, `CSIMigrationAWS` flag is enabled by default, which requires the installation of [external CSI driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver), unless `CSIMigrationAWS` is disabled by the user.
140
+
For installing external CSI/CCM in the upgraded cluster, CRS can be used, see the section above for details.
141
+
142
+
CCM and CSI do not need to be migrated to use external plugins at the same time,
143
+
external CSI drivers works with in-tree CCM (Warning: using in-tree CSI with external CCM does not work).
144
+
145
+
**Following 3 upgrade paths are validated:**
146
+
- Scenario 1: During upgrade to v1.23.x, disabling `CSIMigrationAWS` flag and keep using in-tree CCM and CSI.
147
+
- Scenario 2: During upgrade to v1.23.x, enabling `CSIMigrationAWS` flag and using in-tree CCM with external CSI.
148
+
- Scenario 3: During upgrade to v1.23.x, enabling `CSIMigrationAWS` flag and using external CCM and CSI.
Copy file name to clipboardExpand all lines: test/e2e/data/infrastructure-aws/kustomize_sources/external-cloud-provider/patches/external-cloud-provider.yaml
0 commit comments