Skip to content

Instantly share code, notes, and snippets.

@sabbour
Created January 24, 2023 19:13
Show Gist options
  • Save sabbour/3474f9957fcdee7897397660c45280b0 to your computer and use it in GitHub Desktop.
Save sabbour/3474f9957fcdee7897397660c45280b0 to your computer and use it in GitHub Desktop.
Create an Azure Red Hat OpenShift cluster
LOCATION=eastus # the location of your cluster
RESOURCEGROUP=aro-rg # the name of the resource group where you want to create your cluster
CLUSTER=asabbour # the name of your cluster
az group create \
--name $RESOURCEGROUP \
--location $LOCATION
az network vnet create \
--resource-group $RESOURCEGROUP \
--name aro-vnet \
--address-prefixes 10.0.0.0/22
az network vnet subnet create \
--resource-group $RESOURCEGROUP \
--vnet-name aro-vnet \
--name master-subnet \
--address-prefixes 10.0.0.0/23
az network vnet subnet create \
--resource-group $RESOURCEGROUP \
--vnet-name aro-vnet \
--name worker-subnet \
--address-prefixes 10.0.2.0/23
az aro create \
--resource-group $RESOURCEGROUP \
--name $CLUSTER \
--vnet aro-vnet \
--master-subnet master-subnet \
--worker-subnet worker-subnet
az aro list-credentials \
--name $CLUSTER \
--resource-group $RESOURCEGROUP
az aro show \
--name $CLUSTER \
--resource-group $RESOURCEGROUP \
--query "consoleProfile.url" -o tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment