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
+69-8Lines changed: 69 additions & 8 deletions
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,29 +25,31 @@ 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" %}}
46
48
47
49
1.[Create your cloud credentials](#1-create-your-cloud-credentials)
48
50
2.[Create a node template with your cloud credentials](#2-create-a-node-template-with-your-cloud-credentials)
49
51
3.[Create a cluster with node pools using the node template](#3-create-a-cluster-with-node-pools-using-the-node-template)
50
-
52
+
51
53
### 1. Create your cloud credentials
52
54
53
55
1. Click **☰ > Cluster Management**.
@@ -57,7 +59,7 @@ The creation of this service principal returns three pieces of identification in
57
59
1. Enter your Azure credentials.
58
60
1. Click **Create**.
59
61
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.
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.
61
63
62
64
### 2. Create a node template with your cloud credentials
63
65
@@ -82,17 +84,76 @@ Use Rancher to create a Kubernetes cluster in Azure.
82
84
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.
83
85
1. Click **Create**.
84
86
85
-
**Result:**
87
+
{{% /tab %}}
88
+
{{% tab "RKE2" %}}
89
+
90
+
### 1. Create your cloud credentials
91
+
92
+
1. Click **☰ > Cluster Management**.
93
+
1. Click **Cloud Credentials**.
94
+
1. Click **Create**.
95
+
1. Click **Azure**.
96
+
1. Enter your Azure credentials.
97
+
1. Click **Create**.
98
+
99
+
**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.
100
+
101
+
### 2. Create your cluster
102
+
103
+
Use Rancher to create a Kubernetes cluster in Azure.
104
+
105
+
1. Click **☰ > Cluster Management**.
106
+
1. On the **Clusters** page, click **Create**.
107
+
1. Toggle the switch to **RKE2/K3s**.
108
+
1. Click **Azure**.
109
+
1. Enter a **Cluster Name**.
110
+
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.
111
+
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.
112
+
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/)
113
+
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.
114
+
1. Click **Create**.
115
+
116
+
{{% /tab %}}
117
+
{{% tab "RKE2 - Cluster Template" %}}
118
+
119
+
### 1. Create your cloud credentials
120
+
121
+
1. Click **☰ > Cluster Management**.
122
+
1. Click **Cloud Credentials**.
123
+
1. Click **Create**.
124
+
1. Click **Azure**.
125
+
1. Enter your Azure credentials.
126
+
1. Click **Create**.
127
+
128
+
### 2. Add your cluster template
129
+
130
+
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.
131
+
132
+
### 3. Create your cluster using a cluster template
133
+
134
+
1. Click **☰ > Cluster Management**.
135
+
1. Under the **Use a Catalog Template to create a cluster** section, click **catalog-template**.
136
+
1. Enter a name for the cluster.
137
+
1. Select cloud credentials to use.
138
+
1. Select the **Infrastructure Provider**. If you are using Rancher's [example cluster templates](https://github.com/rancher/cluster-template-examples), select `azure`.
139
+
1. Choose a **Kubernetes Version**.
140
+
1. Configure your nodepools. For help with configurations, refer to [Azure Node Template Configuration.](./azure-node-template-config)
141
+
1. Click **Install**.
142
+
143
+
{{% /tabs %}}
144
+
145
+
**Result:**
86
146
87
147
Your cluster is created and assigned a state of **Provisioning**. Rancher is standing up your cluster.
88
148
89
149
You can access your cluster after its state is updated to **Active**.
90
150
91
-
**Active** clusters are assigned two Projects:
151
+
**Active** clusters are assigned two Projects:
92
152
93
153
-`Default`, containing the `default` namespace
94
154
-`System`, containing the `cattle-system`, `ingress-nginx`, `kube-public`, and `kube-system` namespaces
95
155
156
+
96
157
### Optional Next Steps
97
158
98
159
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:
For more information about Azure, refer to the official [Azure documentation.](https://docs.microsoft.com/en-us/azure/?product=featured)
7
+
8
+
### Environment
9
+
10
+
Microsoft provides multiple [clouds](https://docs.microsoft.com/en-us/cli/azure/cloud?view=azure-cli-latest) for compliance with regional laws, which are available for your use:
11
+
12
+
- AzurePublicCloud
13
+
- AzureGermanCloud
14
+
- AzureChinaCloud
15
+
- AzureUSGovernmentCloud
16
+
17
+
### Location
18
+
19
+
Configure the cluster and node [location](https://docs.microsoft.com/en-us/azure/virtual-machines/regions).
20
+
21
+
### Resource Group
22
+
23
+
A resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. You decide how you want to allocate resources to resource groups based on what makes the most sense for your organization. Generally, add resources that share the same lifecycle to the same resource group so you can easily deploy, update, and delete them as a group.
24
+
25
+
Use an existing resource group or enter a resource group name and one will be created for you.
26
+
27
+
For information on managing resource groups, see the [Azure documentation.](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal)
28
+
29
+
### Availability Set (unmanaged)
30
+
31
+
Name or ID of an existing [availability set](https://docs.microsoft.com/en-us/azure/virtual-machines/availability-set-overview) to add the VM to.
32
+
33
+
### Image
34
+
35
+
The name of the operating system image provided as an ARM resource identifier. Requires using managed disk.
36
+
37
+
### VM Size
38
+
39
+
Choose a size for each VM in the node pool. For details about each VM size, see [this page.](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/)
40
+
41
+
## Advanced Options
42
+
43
+
### Fault Domain Count
44
+
45
+
Fault domains define the group of virtual machines that share a common power source and network switch. If the availability set has already been created, the fault domain count will be ignored.
46
+
47
+
For more information on fault domains, see [refer here](https://docs.microsoft.com/en-us/azure/virtual-machines/availability-set-overview#how-do-availability-sets-work).
48
+
49
+
### Update Domain Count
50
+
51
+
Update domains indicate groups of virtual machines and underlying physical hardware that can be rebooted at the same time. If the availability set has already been created, the update domain count will be ignored.
52
+
53
+
For more information on update domains, see [refer here](https://docs.microsoft.com/en-us/azure/virtual-machines/availability-set-overview#how-do-availability-sets-work).
54
+
55
+
### Purchase Plan
56
+
57
+
Some VM images in the Azure Marketplace require a plan. If applicable, select a purchase plan, formatted as `publisher:product:plan`, to use with your chosen image.
58
+
59
+
### Subnet
60
+
61
+
The name of the subnet when creating a new VNet or referencing an existing one.
62
+
63
+
Default: `docker-machine`
64
+
65
+
### Subnet Prefix
66
+
67
+
The subnet IP address prefix to use when creating a new VNet in CIDR format.
68
+
69
+
Default: `192.168.0.0/16`
70
+
71
+
### Virtual Network
72
+
73
+
The [virtual network](https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview) to use or create if one does not exist. Formatted as `[resourcegroup:]name`.
74
+
75
+
### Public IP Options
76
+
77
+
#### No Public IP
78
+
79
+
Do not allocate a public IP address.
80
+
81
+
#### Static Public IP
82
+
83
+
Allocate a static public IP address.
84
+
85
+
### Use Private IP
86
+
87
+
Use a static private IP address.
88
+
89
+
### Private IP Address
90
+
91
+
Configure a static private IP address to use.
92
+
93
+
### Network Security Group
94
+
95
+
The [network security group](https://docs.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview) to use. All nodes using this template will use the supplied network security group. If no network security group is provided, a new one will be created for each node.
96
+
97
+
### DNS Label
98
+
99
+
A unique DNS name label for the public IP address.
100
+
101
+
### Storage Type
102
+
103
+
The [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview) type to use with your VMs. Options include Standard LRS, Standard ZRS, Standard GRS, Standard RAGRS, and Premium LRS.
104
+
105
+
### Use Managed Disks
106
+
107
+
[Azure managed disks](https://docs.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview) are block-level storage volumes that are managed by Azure and used with Azure Virtual Machines. Managed disks are designed for 99.999% availability. Managed disks achieve this by providing you with three replicas of your data, allowing for high durability.
108
+
109
+
### Managed Disk Size
110
+
111
+
The size in GB for the disk for each node.
112
+
113
+
### SSH Username
114
+
115
+
The username used to create an SSH connection to your nodes.
116
+
117
+
### Open Port
118
+
119
+
Opens inbound traffic on specified ports. When using an existing Network Security Group, Open Ports are ignored.
0 commit comments