Skip to content

Commit 71d41d4

Browse files
committed
Update ROSA docs
1 parent d62768f commit 71d41d4

File tree

8 files changed

+103
-11
lines changed

8 files changed

+103
-11
lines changed

docs/book/src/SUMMARY_PREFIX.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
- [ROSA Support](./topics/rosa/index.md)
2525
- [Enabling ROSA Support](./topics/rosa/enabling.md)
2626
- [Creating a cluster](./topics/rosa/creating-a-cluster.md)
27+
- [Creating MachinePools](./topics/rosa/creating-rosa-machinepools.md)
28+
- [Upgrades](./topics/rosa/upgrades.md)
2729
- [Bring Your Own AWS Infrastructure](./topics/bring-your-own-aws-infrastructure.md)
2830
- [Specifying the IAM Role to use for Management Components](./topics/specify-management-iam-role.md)
2931
- [Using external cloud provider with EBS CSI driver](./topics/external-cloud-provider-with-ebs-csi-driver.md)

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

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Once Step 3 is done, you will be ready to proceed with creating a ROSA cluster u
3737
1. Prepare the environment:
3838
```bash
3939
export OPENSHIFT_VERSION="4.14.5"
40-
export CLUSTER_NAME="capi-rosa-quickstart"
4140
export AWS_REGION="us-west-2"
4241
export AWS_AVAILABILITY_ZONE="us-west-2a"
4342
export AWS_ACCOUNT_ID="<account_id"
@@ -54,11 +53,10 @@ Once Step 3 is done, you will be ready to proceed with creating a ROSA cluster u
5453

5554
1. Render the cluster manifest using the ROSA cluster template:
5655
```shell
57-
cat templates/cluster-template-rosa.yaml | envsubst > rosa-capi-cluster.yaml
56+
clusterctl generate cluster <cluster-name> --from templates/cluster-template-rosa.yaml > rosa-capi-cluster.yaml
5857
```
5958

6059
1. If a credentials secret was created earlier, edit `ROSAControlPlane` to refernce it:
61-
6260
```yaml
6361
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
6462
kind: ROSAControlPlane
@@ -70,7 +68,34 @@ Once Step 3 is done, you will be ready to proceed with creating a ROSA cluster u
7068
...
7169
```
7270

71+
1. Provide an AWS identity reference
72+
```yaml
73+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
74+
kind: ROSAControlPlane
75+
metadata:
76+
name: "capi-rosa-quickstart-control-plane"
77+
spec:
78+
identityRef:
79+
kind: <IdentityType>
80+
name: <IdentityName>
81+
...
82+
```
83+
84+
Otherwise, make sure the following `AWSClusterControllerIdentity` singleton exists in your managment cluster:
85+
```yaml
86+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
87+
kind: AWSClusterControllerIdentity
88+
metadata:
89+
name: "default"
90+
spec:
91+
allowedNamespaces: {} # matches all namespaces
92+
```
93+
94+
see [Multi-tenancy](../multitenancy.md) for more details
95+
7396
1. Finally apply the manifest to create your Rosa cluster:
7497
```shell
7598
kubectl apply -f rosa-capi-cluster.yaml
7699
```
100+
101+
see [ROSAControlPlane CRD Reference](https://cluster-api-aws.sigs.k8s.io/crd/#controlplane.cluster.x-k8s.io/v1beta2.ROSAControlPlane) for all possible configurations.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Creating MachinePools
2+
3+
Cluster API Provider AWS (CAPA) has experimental support for managed ROSA MachinePools through the infrastructure type `ROSAMachinePool`. A `ROSAMachinePool` is responsible for orchestrating and bootstraping a group of EC2 machines into kubernetes nodes.
4+
5+
### Using `clusterctl` to deploy
6+
7+
To deploy a MachinePool / ROSAMachinePool via `clusterctl generate` use the template located [here](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/templates/cluster-template-rosa-machinepool.yaml).
8+
9+
Make sure to set up your environment as described [here](./creating-a-cluster.md#creating-the-cluster).
10+
11+
```shell
12+
clusterctl generate cluster my-cluster --from templates/cluster-template-rosa-machinepool > my-cluster.yaml
13+
```
14+
15+
## Example
16+
17+
Below is an example of the resources needed to create a ROSA MachinePool.
18+
19+
```yaml
20+
---
21+
apiVersion: cluster.x-k8s.io/v1beta1
22+
kind: MachinePool
23+
metadata:
24+
name: "${CLUSTER_NAME}-pool-0"
25+
spec:
26+
clusterName: "${CLUSTER_NAME}"
27+
replicas: 1
28+
template:
29+
spec:
30+
clusterName: "${CLUSTER_NAME}"
31+
bootstrap:
32+
dataSecretName: ""
33+
infrastructureRef:
34+
name: "${CLUSTER_NAME}-pool-0"
35+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
36+
kind: ROSAMachinePool
37+
---
38+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
39+
kind: ROSAMachinePool
40+
metadata:
41+
name: "${CLUSTER_NAME}-pool-0"
42+
spec:
43+
nodePoolName: "nodepool-0"
44+
instanceType: "m5.xlarge"
45+
subnet: "${PRIVATE_SUBNET_ID}"
46+
version: "${OPENSHIFT_VERSION}"
47+
```
48+
49+
see [ROSAMachinePool CRD Reference](https://cluster-api-aws.sigs.k8s.io/crd/#infrastructure.cluster.x-k8s.io/v1beta2.ROSAMachinePool) for all possible configurations.

docs/book/src/topics/rosa/enabling.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Enabling ROSA Support
22

3-
To enable support for ROSA clusters, the ROSA feature flag must be set to true. This can be done using the **EXP_ROSA** environment variable:
3+
To enable support for ROSA clusters, the ROSA feature flag must be set to true. This can be done using the **EXP_ROSA** environment variable.
44

5+
Make sure to set up your AWS environment first as described [here](https://cluster-api.sigs.k8s.io/user/quick-start.html).
56
```shell
67
export EXP_ROSA="true"
78
export EXP_MACHINE_POOL="true"

docs/book/src/topics/rosa/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ A new template is available in the templates folder for creating a managed ROSA
1919
## SEE ALSO
2020

2121
* [Enabling ROSA Support](enabling.md)
22-
* [Creating a cluster](creating-a-cluster.md)
22+
* [Creating a cluster](creating-a-cluster.md)
23+
* [Creating MachinePools](creating-rosa-machinepools.md)
24+
* [Upgrades](upgrades.md)

docs/book/src/topics/rosa/upgrades.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Upgrades
2+
3+
## Control Plane Upgrade
4+
5+
Upgrading the OpenShift 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 `ROSAControlPlane`. Once the version has changed the provider will handle the upgrade for you.
6+
7+
The Upgrade state can be checked in the conditions under `ROSAControlPlane.status`.
8+
9+
## MachinePool Upgrade
10+
11+
Upgrading the OpenShift version of the MachinePools is supported by the provider and can be performed independetly from the Control Plane upgrades. To perform an upgrade you need to update the `version` in the spec of the `ROSAMachinePool`. Once the version has changed the provider will handle the upgrade for you.
12+
13+
The Upgrade state can be checked in the conditions under `ROSAMachinePool.status`.
14+
15+
The version of the MachinePool can't be greater than Control Plane version.

templates/cluster-template-rosa-machinepool.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ kind: ROSAControlPlane
2727
metadata:
2828
name: "${CLUSTER_NAME}-control-plane"
2929
spec:
30-
rosaClusterName: ${CLUSTER_NAME:0:15}
30+
rosaClusterName: ${CLUSTER_NAME:0:54}
3131
version: "${OPENSHIFT_VERSION}"
3232
region: "${AWS_REGION}"
3333
network:
@@ -43,7 +43,7 @@ spec:
4343
kmsProviderARN: "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${OPERATOR_ROLES_PREFIX}-kube-system-kms-provider"
4444
oidcID: "${OIDC_CONFIG_ID}"
4545
subnets:
46-
- "${PUBLIC_SUBNET_ID}"
46+
- "${PUBLIC_SUBNET_ID}" # remove if creating a private cluster
4747
- "${PRIVATE_SUBNET_ID}"
4848
availabilityZones:
4949
- "${AWS_AVAILABILITY_ZONE}"
@@ -77,5 +77,3 @@ spec:
7777
instanceType: "m5.xlarge"
7878
subnet: "${PRIVATE_SUBNET_ID}"
7979
version: "${OPENSHIFT_VERSION}"
80-
81-

templates/cluster-template-rosa.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ kind: ROSAControlPlane
2727
metadata:
2828
name: "${CLUSTER_NAME}-control-plane"
2929
spec:
30-
rosaClusterName: ${CLUSTER_NAME:0:15}
30+
rosaClusterName: ${CLUSTER_NAME:0:54}
3131
version: "${OPENSHIFT_VERSION}"
3232
region: "${AWS_REGION}"
3333
network:
@@ -43,7 +43,7 @@ spec:
4343
kmsProviderARN: "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${OPERATOR_ROLES_PREFIX}-kube-system-kms-provider"
4444
oidcID: "${OIDC_CONFIG_ID}"
4545
subnets:
46-
- "${PUBLIC_SUBNET_ID}"
46+
- "${PUBLIC_SUBNET_ID}" # remove if creating a private cluster
4747
- "${PRIVATE_SUBNET_ID}"
4848
availabilityZones:
4949
- "${AWS_AVAILABILITY_ZONE}"

0 commit comments

Comments
 (0)