Last active
January 18, 2022 00:49
-
-
Save vfarcic/6e01717c398a5d034ebe05b195514060 to your computer and use it in GitHub Desktop.
This file contains 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
# Source: https://gist.github.com/6e01717c398a5d034ebe05b195514060 | |
#################### | |
# Create a cluster # | |
#################### | |
# Install [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and make sure you have Azure admin permissions | |
echo "nexus: | |
enabled: false | |
" | tee myvalues.yaml | |
# Please replace [...] with a unique name (e.g., your GitHub user and a day and month). | |
# Otherwise, it might fail to create a registry. | |
# The name of the cluster must conform to the following pattern: '^[a-zA-Z0-9]*$'. | |
CLUSTER_NAME=[...] | |
jx create cluster aks \ | |
--cluster-name $CLUSTER_NAME \ | |
--resource-group-name jxrocks-group \ | |
--location eastus \ | |
--node-vm-size Standard_D2s_v3 \ | |
--nodes 3 \ | |
--default-admin-password=admin \ | |
--default-environment-prefix jx-rocks \ | |
--git-provider-kind github | |
####################### | |
# Destroy the cluster # | |
####################### | |
az aks delete \ | |
-n $CLUSTER_NAME \ | |
-g jxrocks-group \ | |
--yes | |
kubectl config delete-cluster $CLUSTER_NAME | |
kubectl config delete-context $CLUSTER_NAME | |
kubectl config unset \ | |
users.clusterUser_jxrocks-group_$CLUSTER_NAME | |
az group delete \ | |
--name jxrocks-group \ | |
--yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment