-
-
Save mkol5222/a290522c6aaaaa92f29424b7b28773b7 to your computer and use it in GitHub Desktop.
Create an Azure Red Hat OpenShift cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCATION=northeurope # the location of your cluster | |
RESOURCEGROUP=aro-rg # the name of the resource group where you want to create your cluster | |
CLUSTER=aro # 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 | |
time 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 | |
# via https://learn.microsoft.com/en-us/azure/openshift/connect-cluster | |
cd ~ | |
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz | |
mkdir openshift | |
tar -zxvf openshift-client-linux.tar.gz -C openshift | |
echo 'export PATH=$PATH:~/openshift' >> ~/.bashrc && source ~/.bashrc | |
export PATH=$PATH:~/openshift | |
which oc | |
az group delete --name $RESOURCEGROUP --yes --no-wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment