Skip to content

Commit 3dfc109

Browse files
author
Sakthi Vetrivel
committed
adding variables
1 parent 6611844 commit 3dfc109

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

articles/openshift/create-private-cluster.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,15 @@ Next, you will create a virtual network containing two empty subnets.
8080
```console
8181
LOCATION=eastus #the location of your cluster
8282
RESOURCEGROUP="v4-$LOCATION" #the name of the resource group where you want to create your cluster
83-
CLUSTER=cluster #the name of your cluster
83+
CLUSTER=aro-cluster #the name of your cluster
8484
```
8585

8686
1. **Create a resource group**
8787

8888
An Azure resource group is a logical group in which Azure resources are deployed and managed. When you create a resource group, you are asked to specify a location. This location is where resource group metadata is stored, it is also where your resources run in Azure if you don't specify another region during resource creation. Create a resource group using the [az group create][az-group-create] command.
8989

90-
The following example creates a resource group named *aro-rg* in the *eastus* location.
91-
9290
```azurecli-interactive
93-
az group create --name aro-rg --location eastus
91+
az group create --name $RESOURCEGROUP --location $LOCATION
9492
```
9593
9694
The following example output shows the resource group created successfully:
@@ -108,17 +106,17 @@ Next, you will create a virtual network containing two empty subnets.
108106
}
109107
```
110108
111-
3. **Create a virtual network.**
109+
2. **Create a virtual network.**
112110
113111
Azure Red Hat OpenShift clusters running OpenShift 4 require a virtual network with two empty subnets, for the master and worker nodes.
114112
115-
Create a new virtual network in the same resource group you created earlier, for example in *aro-rg*.
113+
Create a new virtual network in the same resource group you created earlier.
116114
117115
```azurecli-interactive
118116
az network vnet create \
119-
--resource-group aro-rg \
117+
--resource-group $RESOURCEGROUP \
120118
--name aro-vnet \
121-
--address-prefixes 10.0.0.0/8
119+
--address-prefixes 10.0.0.0/22
122120
```
123121
124122
The following example output shows the virtual network created successfully:
@@ -128,7 +126,7 @@ Next, you will create a virtual network containing two empty subnets.
128126
"newVNet": {
129127
"addressSpace": {
130128
"addressPrefixes": [
131-
"10.0.0.0/8"
129+
"10.0.0.0/22"
132130
]
133131
},
134132
"id": "/subscriptions/<guid>/resourceGroups/aro-rg/providers/Microsoft.Network/virtualNetworks/aro-vnet",
@@ -141,34 +139,34 @@ Next, you will create a virtual network containing two empty subnets.
141139
}
142140
```
143141
144-
4. **Add an empty subnet for the master nodes.**
142+
3. **Add an empty subnet for the master nodes.**
145143
146144
```azurecli-interactive
147145
az network vnet subnet create \
148-
--resource-group aro-rg \
146+
--resource-group $RESOURCEGROUP \
149147
--vnet-name aro-vnet \
150148
--name master-subnet \
151-
--address-prefixes 10.0.1.0/24 \
149+
--address-prefixes 10.0.0.0/23 \
152150
--service-endpoints Microsoft.ContainerRegistry
153151
```
154152
155-
5. **Add an empty subnet for the worker nodes.**
153+
4. **Add an empty subnet for the worker nodes.**
156154
157155
```azurecli-interactive
158156
az network vnet subnet create \
159-
--resource-group aro-rg \
157+
--resource-group $RESOURCEGROUP \
160158
--vnet-name aro-vnet \
161159
--name worker-subnet \
162-
--address-prefixes 10.1.0.0/20 \
160+
--address-prefixes 10.0.1.0/23 \
163161
--service-endpoints Microsoft.ContainerRegistry
164162
```
165163
166-
6. **[Disable subnet private endpoint policies](https://docs.microsoft.com/azure/private-link/disable-private-link-service-network-policy) on the master subnet.** This is required to be able to connect and manage the cluster.
164+
5. **[Disable subnet private endpoint policies](https://docs.microsoft.com/azure/private-link/disable-private-link-service-network-policy) on the master subnet.** This is required to be able to connect and manage the cluster.
167165
168166
```azurecli-interactive
169167
az network vnet subnet update \
170168
--name master-subnet \
171-
--resource-group aro-rg \
169+
--resource-group ar \
172170
--vnet-name aro-vnet \
173171
--disable-private-link-service-network-policies true
174172
```
@@ -179,8 +177,8 @@ Run the following command to create a cluster. Note the `apiserver-visibility` a
179177
180178
```azurecli-interactive
181179
az aro create \
182-
--resource-group aro-rg \
183-
--name aro-cluster \
180+
--resource-group $RESOURCEGROUP \
181+
--name $CLUSTER \
184182
--vnet aro-vnet \
185183
--master-subnet master-subnet \
186184
--worker-subnet worker-subnet \
@@ -204,8 +202,8 @@ You can log into the cluster using the `kubeadmin` user. Run the following comm
204202

205203
```azurecli-interactive
206204
az aro list-credentials \
207-
--name aro-cluster \
208-
--resource-group aro-rg
205+
--name $CLUSTER \
206+
--resource-group $RESOURCEGROUP
209207
```
210208

211209
The following example output shows the password will be in `kubeadminPassword`.
@@ -221,8 +219,8 @@ You can find the cluster console URL by running the following command, which wil
221219

222220
```azurecli-interactive
223221
az aro show \
224-
--name aro-cluster \
225-
--resource-group aro-rg \
222+
--name $CLUSTER \
223+
--resource-group $RESOURCEGROUP \
226224
--query "consoleProfile.url" -o tsv
227225
```
228226

@@ -246,7 +244,7 @@ You can also download the latest release of the CLI appropriate to your machine
246244
Retrieve the API server's address.
247245

248246
```azurecli-interactive
249-
apiServer=$(az aro show -g aro-rg -n aro-cluster --query apiserverProfile.url -o tsv)
247+
apiServer=$(az aro show -g $RESOURCEGROUP -n $CLUSTER --query apiserverProfile.url -o tsv)
250248
```
251249

252250
>[!IMPORTANT]

0 commit comments

Comments
 (0)