Skip to content

Commit 3ac9ff9

Browse files
authored
Merge pull request #5319 from willie-yao/aso-quick-start
docs: Getting Started first cluster focuses on AKS ASO
2 parents 6a1f654 + 11ba88f commit 3ac9ff9

File tree

1 file changed

+91
-2
lines changed

1 file changed

+91
-2
lines changed

docs/book/src/getting-started.md

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,98 @@ The capability to set credentials using environment variables is now deprecated
9090

9191

9292
### Building your first cluster
93-
Check out the [Cluster API Quick Start](https://cluster-api.sigs.k8s.io/user/quick-start.html) to create your first Kubernetes cluster on Azure using Cluster API. Make sure to select the "Azure" tabs.
9493

95-
If you are looking to install additional ASO CRDs, set `ADDITIONAL_ASO_CRDS` to the list of CRDs you want to install. Refer to adding additional CRDs for Azure Service Operator [here](./topics/aso.md#Using-aso-for-non-capz-resources).
94+
The recommended way to build a cluster is to install a CAPZ management cluster using [Cluster API Operator](https://github.com/kubernetes-sigs/cluster-api-operator), then utilizing a Helm chart to create a workload cluster, specifically an [ASO Managed Cluster](./managed/asomanagedcluster.md).
95+
96+
To create a cluster manually, check out the [Cluster API Quick Start](https://cluster-api.sigs.k8s.io/user/quick-start.html) for in-depth instructions. Make sure to select the "Azure" tabs. If you are looking to install additional ASO CRDs, set `ADDITIONAL_ASO_CRDS` to the list of CRDs you want to install. Refer to adding additional CRDs for Azure Service Operator [here](./topics/aso.md#Using-aso-for-non-capz-resources).
97+
98+
## Creating a CAPZ Management Cluster with CAPI Operator
99+
100+
First, it is a common practice to create a temporary, local bootstrap cluster to deploy the management cluster. You can either use an existing Kubernetes cluster, or create a kind cluster for this purpose.
101+
102+
```bash
103+
kind create cluster
104+
```
105+
106+
Add the CAPI Operator and cert-manager Helm repositories, which we will use to install the management cluster.
107+
108+
```bash
109+
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
110+
helm repo add jetstack https://charts.jetstack.io --force-update
111+
helm repo update
112+
```
113+
114+
Install cert manager:
115+
116+
```bash
117+
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
118+
```
119+
120+
Create a `values.yaml` file for the CAPI Operator Helm chart like so:
121+
122+
```yaml
123+
core: "cluster-api:v1.8.5"
124+
infrastructure: "azure:v1.17.2"
125+
addon: "helm:v0.2.5"
126+
manager:
127+
featureGates:
128+
core:
129+
ClusterTopology: true
130+
```
131+
132+
Install the CAPI Operator:
133+
134+
```bash
135+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -f values.yaml --wait --timeout 90s
136+
```
137+
138+
## Creating an ASO Managed workload cluster
139+
140+
Once your management cluster is up and running, you can create an ASO Managed Cluster using the [azure-aks-aso Helm chart](https://github.com/mboersma/cluster-api-charts/tree/main/charts/azure-aks-aso).
141+
142+
Add the cluster-api-charts Helm repository:
143+
144+
```bash
145+
helm repo add capi https://mboersma.github.io/cluster-api-charts
146+
```
147+
148+
Specify values for the CAPZ AKS-ASO Helm chart in a `values.yaml` file. For example:
149+
150+
```yaml
151+
credentialSecretName: "aso-credentials"
152+
createCredentials: true
153+
subscriptionID: "subscription-id"
154+
tenantID: "tenant-id"
155+
clientID: "client-id"
156+
# Leave clientSecret blank if using WorkloadIdentity
157+
clientSecret: "client-secret"
158+
# set to podIdentity for managed identity or service principal even if NOT using pod identity
159+
authMode: "podIdentity"
160+
161+
# clusterName defaults to the name of the Helm release
162+
clusterName: ""
163+
location: westus3
164+
165+
managedMachinePoolSpecs:
166+
pool0:
167+
count: 1
168+
mode: System
169+
vmSize: Standard_DS2_v2
170+
type: VirtualMachineScaleSets
171+
pool1:
172+
count: 1
173+
mode: User
174+
vmSize: Standard_DS2_v2
175+
type: VirtualMachineScaleSets
176+
```
177+
178+
Install the Helm chart:
179+
180+
```bash
181+
helm install quick-start capi/azure-aks-aso -f values.yaml
182+
```
183+
184+
For more information on the `azure-aks-aso` Helm chart, see the [chart documentation](https://github.com/mboersma/cluster-api-charts/tree/main/charts/azure-aks-aso#azure-aks-aso-chart).
96185

97186
<h1> Warning </h1>
98187

0 commit comments

Comments
 (0)