Skip to content

Commit 3318ab8

Browse files
authored
Use CAAPF and HelmApps for Azure Class example (#265)
Signed-off-by: Andrea Mazzotti <[email protected]>
1 parent 80e47cf commit 3318ab8

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

docs/next/modules/en/pages/user/clusterclass.adoc

+16-12
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ spec:
8181

8282
== Create a Cluster from a ClusterClass
8383

84+
[WARNING]
85+
====
86+
Examples using `HelmApps` need at least Rancher `v2.11`, or otherwise Fleet `v0.12` or higher.
87+
====
88+
8489
[tabs]
8590
======
8691
@@ -90,19 +95,20 @@ Azure RKE2::
9095
+
9196
[source,bash]
9297
----
93-
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/clusterclasses/azure/clusterclass-example.yaml
98+
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/clusterclasses/azure/clusterclass-rke2-example.yaml
9499
----
95100
+
96-
* Additionally, the Azure Cloud Provider will need to be installed on each downstream Cluster, for the nodes to be initialized correctly. +
97-
+
98-
We can do this automatically at Cluster creation using a https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set[ClusterResourceSet]. +
99-
Beware of the `azure-cloud-controller-manager` image version number on the ClusterResourceSet manifest. This is hardcoded, but should match the version of Kubernetes that the Cluster is using. +
101+
* Additionally, the https://capz.sigs.k8s.io/self-managed/cloud-provider-config[Azure Cloud Provider] will need to be installed on each downstream Cluster, for the nodes to be initialized correctly. +
102+
For this example we are also going to install https://docs.tigera.io/calico/latest/about/[Calico] as the default CNI. +
100103
+
101-
The ClusterResourceSet is configured to match any Cluster with the `cloud-provider: azure` label. +
104+
We can do this automatically at Cluster creation using the https://rancher-sandbox.github.io/cluster-api-addon-provider-fleet/[Cluster API Add-on Provider Fleet]. +
105+
This Add-on provider is installed by default with {product_name}. +
106+
Two `HelmApps` need to be created first, to be applied on the new Cluster via label selectors. +
102107
+
103108
[source,bash]
104109
----
105-
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/azure/clusterresourceset-cloud-provider.yaml
110+
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/ccm/azure/helm-chart.yaml
111+
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/cni/calico/helm-chart.yaml
106112
----
107113
+
108114
* Create the Azure Cluster from the example ClusterClass +
@@ -117,17 +123,15 @@ metadata:
117123
labels:
118124
cluster-api.cattle.io/rancher-auto-import: "true"
119125
cloud-provider: azure
126+
cni: calico
120127
name: azure-quickstart
121128
spec:
122129
clusterNetwork:
123130
pods:
124131
cidrBlocks:
125-
- 10.96.0.0/12
126-
services:
127-
cidrBlocks:
128-
- 10.244.0.0/16
132+
- 192.168.0.0/16
129133
topology:
130-
class: azure-example
134+
class: azure-rke2-example
131135
controlPlane:
132136
replicas: 3
133137
variables:

0 commit comments

Comments
 (0)