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
az aks create --resource-group <resource-group> --name <cluster-name> --kubernetes-version 1.12.4 \ | |
--node-count 1 --node-vm-size Standard_DS1_v2 \ | |
--vnet-subnet-id "/subscriptions/xxxx-xxxx-xxxxxxxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Network/virtualNetworks/k8s-vnet/subnets/k8s-nodes-subnet" \ | |
--network-plugin azure \ | |
--service-cidr 10.20.0.0/16 --dns-service-ip 10.20.0.10 \ | |
--enable-cluster-autoscaler \ | |
--min-count 1 \ | |
--max-count 3 |
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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
k8s-app: cluster-autoscaler | |
name: cluster-autoscaler | |
namespace: kube-system | |
--- |
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
bash cluster-autoscaler.sh | |
Output: | |
--- | |
apiVersion: v1 | |
data: | |
ClientID: <base64 encoded> | |
ClientSecret: <base64 encoded> | |
ResourceGroup: <base64 encoded> | |
SubscriptionID: <base64 encoded> |
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
#! /bin/bash | |
set -x | |
ID=`az account show --query id -o json` | |
SUBSCRIPTION_ID=`echo $ID | tr -d '"' ` | |
TENANT=`az account show --query tenantId -o json` | |
TENANT_ID=`echo $TENANT | tr -d '"' | base64` | |
read -p "What's your cluster name? " cluster_name | |
read -p "Resource group name? " resource_group |
NewerOlder