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: content/rancher/v2.6/en/cluster-provisioning/rke-clusters/node-pools/azure/_index.md
+8-80Lines changed: 8 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ weight: 2220
6
6
7
7
In this section, you'll learn how to install an [RKE]({{<baseurl>}}/rke/latest/en/) Kubernetes cluster in Azure through Rancher.
8
8
9
-
First, you will set up your Azure cloud credentials in Rancher. Then you will use your cloud credentials to create a node template, which Rancher will use to provision new nodes in Azure.
9
+
First, you will set up your Azure cloud credentials in Rancher. Then you will use your cloud credentials to create a node template, which Rancher will use to provision new nodes in Azure.
10
10
11
11
Then you will create an Azure cluster in Rancher, and when configuring the new cluster, you will define node pools for it. Each node pool will have a Kubernetes role of etcd, controlplane, or worker. Rancher will install Kubernetes on the new nodes, and it will set up each node with the Kubernetes role defined by the node pool.
12
12
@@ -25,31 +25,29 @@ For more information on configuring Azure node templates, refer to the [Azure no
25
25
-[Creating an Azure Cluster](#creating-an-azure-cluster)
26
26
27
27
# Preparation in Azure
28
-
28
+
29
29
Before creating a node template in Rancher using a cloud infrastructure such as Azure, we must configure Rancher to allow the manipulation of resources in an Azure subscription.
30
30
31
31
To do this, we will first create a new Azure **service principal (SP)** in Azure **Active Directory (AD)**, which, in Azure, is an application user who has permission to manage Azure resources.
32
32
33
33
The following is a template `az cli` script that you have to run for creating an service principal, where you have to enter your SP name, role, and scope:
34
-
34
+
35
35
```
36
36
az ad sp create-for-rbac \
37
37
--name="<Rancher ServicePrincipal name>" \
38
38
--role="Contributor" \
39
39
--scopes="/subscriptions/<subscription Id>"
40
40
```
41
-
41
+
42
42
The creation of this service principal returns three pieces of identification information, *The application ID, also called the client ID*, and *The client secret*. This information will be used when you create a node template for Azure.
43
43
44
44
# Creating an Azure Cluster
45
45
46
-
{{% tabs %}}
47
-
{{% tab "RKE" %}}
48
46
49
47
1.[Create your cloud credentials](#1-create-your-cloud-credentials)
50
48
2.[Create a node template with your cloud credentials](#2-create-a-node-template-with-your-cloud-credentials)
51
49
3.[Create a cluster with node pools using the node template](#3-create-a-cluster-with-node-pools-using-the-node-template)
52
-
50
+
53
51
### 1. Create your cloud credentials
54
52
55
53
1. Click **☰ > Cluster Management**.
@@ -59,7 +57,7 @@ The creation of this service principal returns three pieces of identification in
59
57
1. Enter your Azure credentials.
60
58
1. Click **Create**.
61
59
62
-
**Result:** You have created the cloud credentials that will be used to provision nodes in your cluster. You can reuse these credentials for other node templates, or in other clusters.
60
+
**Result:** You have created the cloud credentials that will be used to provision nodes in your cluster. You can reuse these credentials for other node templates, or in other clusters.
63
61
64
62
### 2. Create a node template with your cloud credentials
65
63
@@ -84,87 +82,17 @@ Use Rancher to create a Kubernetes cluster in Azure.
84
82
1. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user.
85
83
1. Click **Create**.
86
84
87
-
**Result:**
85
+
**Result:**
88
86
89
87
Your cluster is created and assigned a state of **Provisioning**. Rancher is standing up your cluster.
90
88
91
89
You can access your cluster after its state is updated to **Active**.
92
90
93
-
**Active** clusters are assigned two Projects:
91
+
**Active** clusters are assigned two Projects:
94
92
95
93
-`Default`, containing the `default` namespace
96
94
-`System`, containing the `cattle-system`, `ingress-nginx`, `kube-public`, and `kube-system` namespaces
97
95
98
-
{{% /tab %}}
99
-
{{% tab "RKE2" %}}
100
-
101
-
### 1. Create your cloud credentials
102
-
103
-
1. Click **☰ > Cluster Management**.
104
-
1. Click **Cloud Credentials**.
105
-
1. Click **Create**.
106
-
1. Click **Azure**.
107
-
1. Enter your Azure credentials.
108
-
1. Click **Create**.
109
-
110
-
**Result:** You have created the cloud credentials that will be used to provision nodes in your cluster. You can reuse these credentials for other node templates, or in other clusters.
111
-
112
-
### 2. Create your cluster
113
-
114
-
Use Rancher to create a Kubernetes cluster in Azure.
115
-
116
-
1. Click **☰ > Cluster Management**.
117
-
1. On the **Clusters** page, click **Create**.
118
-
1. Toggle the switch to **RKE2/K3s**.
119
-
1. Click **Azure**.
120
-
1. Enter a **Cluster Name**.
121
-
1. Create a machine pool for each Kubernetes role. Refer to the [best practices]({{<baseurl>}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/node-pools#node-roles-in-rke2) for recommendations on role assignments and counts.
122
-
1. For each machine pool, define the machine configuration. Refer to the [Azure machine configuration reference]({{<baseurl>}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/node-pools/azure/azure-machine-config/) for information on configuration options.
123
-
1. Use the **Cluster Configuration** to choose the version of Kubernetes that will be installed, what network provider will be used and if you want to enable project network isolation. For help configuring the cluster, refer to the [RKE2 cluster configuration reference.]({{<baseurl>}}/rancher/v2.6/en/cluster-admin/editing-clusters/rke2-config-reference/)
124
-
1. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user.
125
-
1. Click **Create**.
126
-
127
-
{{% /tab %}}
128
-
{{% tab "RKE2 - Cluster Template" %}}
129
-
130
-
### 1. Create your cloud credentials
131
-
132
-
1. Click **☰ > Cluster Management**.
133
-
1. Click **Cloud Credentials**.
134
-
1. Click **Create**.
135
-
1. Click **Azure**.
136
-
1. Enter your Azure credentials.
137
-
1. Click **Create**.
138
-
139
-
### 2. Add your cluster template
140
-
141
-
1. Follow these [instructions]({{<baseurl>}}/rancher/v2.6/en/admin-settings/cluster-templates/#adding-a-cluster-template-to-rancher) to add a cluster template to Rancher.
142
-
143
-
### 3. Create your cluster using a cluster template
144
-
145
-
1. Click **☰ > Cluster Management**.
146
-
1. Under the **Use a Catalog Template to create a cluster** section, click **catalog-template**.
147
-
1. Enter a name for the cluster.
148
-
1. Select cloud credentials to use.
149
-
1. Select the **Infrastructure Provider**. If you are using Rancher's [example cluster templates](https://github.com/rancher/cluster-template-examples), select `azure`.
150
-
1. Choose a **Kubernetes Version**.
151
-
1. Configure your nodepools. For help with configurations, refer to [Azure Node Template Configuration.](./azure-node-template-config)
152
-
1. Click **Install**.
153
-
154
-
{{% /tabs %}}
155
-
156
-
**Result:**
157
-
158
-
Your cluster is created and assigned a state of **Provisioning**. Rancher is standing up your cluster.
159
-
160
-
You can access your cluster after its state is updated to **Active**.
161
-
162
-
**Active** clusters are assigned two Projects:
163
-
164
-
-`Default`, containing the `default` namespace
165
-
-`System`, containing the `cattle-system`, `ingress-nginx`, `kube-public`, and `kube-system` namespaces
166
-
167
-
168
96
### Optional Next Steps
169
97
170
98
After creating your cluster, you can access it through the Rancher UI. As a best practice, we recommend setting up these alternate ways of accessing your cluster:
0 commit comments