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
Get the latest [release of `clusterctl`](https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases) and place them in your PATH.
56
+
If you're interested in developing cluster-api-provider-azure and getting the latest version from `master`, please follow the [development guide][development].
57
57
58
-
#### Building from master
58
+
###Deploying a cluster
59
59
60
-
If you're interested in developing cluster-api-provider-azure and getting the latest version from `master`, please follow the [development guide][development].
60
+
#### Setting up your Azure environment
61
+
62
+
An Azure Service Principal is needed for populating the controller manifests. This utilizes [environment-based authentication](https://docs.microsoft.com/en-us/go/azure/azure-sdk-go-authorization#use-environment-based-authentication).
63
+
64
+
1. List your Azure subscriptions.
61
65
62
-
## Deploying a cluster
66
+
```bash
67
+
az account list -o table
68
+
```
63
69
64
-
### Setting up the environment
70
+
2. Save your Subscription ID in an enviroment variable.
65
71
66
-
An Azure Service Principal is needed for usage by the `clusterctl` tool and for populating the controller manifests. This utilizes [environment-based authentication](https://docs.microsoft.com/en-us/go/azure/azure-sdk-go-authorization#use-environment-based-authentication).
72
+
```bash
73
+
export AZURE_SUBSCRIPTION_ID="<SubscriptionId>"
74
+
```
75
+
76
+
3. Create an Azure Service Principal by running the following command or skip this step and use a previously created Azure Service Principal.
67
77
68
-
The following environment variables should be set:
78
+
```bash
79
+
az ad sp create-for-rbac --name SPClusterAPI
80
+
```
69
81
70
-
-`AZURE_SUBSCRIPTION_ID`
71
-
-`AZURE_TENANT_ID`
72
-
-`AZURE_CLIENT_ID`
73
-
-`AZURE_CLIENT_SECRET`
82
+
4. Save the output from the above command in enviroment variables.
74
83
75
-
An alternative is to install [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and have the project's script create the service principal automatically. _Note that the service principals created by the scripts will not be deleted automatically._
84
+
```bash
85
+
export AZURE_TENANT_ID=<Tenant>
86
+
export AZURE_CLIENT_ID=<AppId>
87
+
export AZURE_CLIENT_SECRET=<Password>
88
+
export AZURE_LOCATION="eastus"
89
+
```
90
+
<!--An alternative is to install [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and have the project's script create the service principal automatically. _Note that the service principals created by the scripts will not be deleted automatically._ -->
76
91
77
-
### Generating cluster manifests and example cluster
92
+
####Generating cluster manifests and example cluster
78
93
79
94
Download the cluster-api-provider-azure-examples.tar file and unpack it.
80
95
@@ -91,10 +106,10 @@ Here is a list of commonly overriden configuration parameters (the full list is
91
106
```bash
92
107
# Azure settings.
93
108
export AZURE_LOCATION="eastus"
94
-
export AZURE_RESOURCE_GROUP="kubecuddles"
109
+
export AZURE_RESOURCE_GROUP="capz-rg"
95
110
96
111
# Cluster settings.
97
-
export CLUSTER_NAME="pony-unicorns"
112
+
export CLUSTER_NAME="capz-cluster"
98
113
99
114
# Machine settings.
100
115
export CONTROL_PLANE_MACHINE_TYPE="Standard_B2ms"
@@ -112,7 +127,7 @@ You can also [build your own image](https://github.com/kubernetes-sigs/image-bui
112
127
Now that the deployment has been customized, the next step is to generate the required manifests:
113
128
114
129
```bash
115
-
./azure/generate-yaml.sh
130
+
./examples/generate.sh
116
131
```
117
132
118
133
**Please review `manifests.md` to understand which manifests to use for various cluster scenarios.**
@@ -126,16 +141,10 @@ Verify that the manifests reflect the expected settings before continuing.
126
141
You can now start the Cluster API controllers and deploy a new cluster in Azure:
The created KIND cluster is ephemeral and is cleaned up automatically when done. During the cluster creation, the kubectl context is set to "kind-clusterapi" and can be retrieved using `kubectl cluster-info --context kind-clusterapi`.
242
251
243
-
For a more in-depth look into what `clusterctl` is doing during this create step, please see the [clusterctl document](/docs/clusterctl.md).
244
-
245
-
## Using the cluster
246
-
247
-
The kubeconfig for the new cluster is created in the directory from where the above `clusterctl create` was run.
248
-
249
-
Run the following command to point `kubectl` to the kubeconfig of the new cluster:
250
-
251
-
```bash
252
-
export KUBECONFIG=$(pwd)/kubeconfig
253
-
```
252
+
## Next steps
254
253
255
-
Alternatively, move the kubeconfig file to a desired location and set the `KUBECONFIG` environment variable accordingly.
254
+
You've just created an initial management cluster with kind. You are now ready to set up this management cluster and use it to create workload clusters. Follow the documentation in the [Cluster API Book](https://cluster-api.sigs.k8s.io/tasks/installation.html) to learn more.
0 commit comments