-
Notifications
You must be signed in to change notification settings - Fork 0
/
AKS.txt
31 lines (19 loc) · 842 Bytes
/
AKS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Create Azure Kubernetes Service
--------------------------------------------------------------------------
Create service principal
az ad sp create-for-rbac --skip-assignment
---------------------------------------------------------------------------
Get ACR ressource ID
az acr show --resource-group myResourceGroup --name <acrName> --query "id" --output tsv
---------------------------------------------------------------------------
Grant AKS access to pull images
az role assignment create --assignee <appId> --scope <acrId> --role acrpull
---------------------------------------------------------------------------
Create cluster
az aks create \
--resource-group KubernetesRS \
--name KTKubernetesCluster \
--node-count 1 \
--service-principal $APP_ID \
--client-secret $AKS_PAS \
--generate-ssh-keys