- url:
https://shell.azure.com/switch to bash if not
az account set --subscription $YourSubscriptionName_or_ID
az aks get-credentials --name $YourClusterName --resource-group $YourResourceGroup --overwrite-existing
https://shell.azure.com/
switch to bash if notaz account set --subscription $YourSubscriptionName_or_ID
az aks get-credentials --name $YourClusterName --resource-group $YourResourceGroup --overwrite-existing
After node/vm instances deployed, to obtain updated DNS server setting from the Vnet, the host must be restarted.
To avoid rebooting every nodes, here is an unsafe way to restart the networkd in every nodes of the cluster:
kubectl apply -f https://gist.githubusercontent.com/m8yng/8d878b022c860b47344a16e4b1f9be1d/raw/b5d831c888716d53606f1cb586a9b220c565a1c0/z_restart-networkd.yaml
Make sure remove it once its done:
kubectl delete -f https://gist.githubusercontent.com/m8yng/8d878b022c860b47344a16e4b1f9be1d/raw/b5d831c888716d53606f1cb586a9b220c565a1c0/z_restart-networkd.yaml
The Problem: Unable to execute .exe from WSL
The error:
$ powershell.exe
-bash: /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe: cannot execute binary file: Exec format error
# or:
Deploy one hostprocess (privileged) container on every windows nodes in AKS
kubectl apply -f https://gist.githubusercontent.com/m8yng/b8c4115cc9c86c391686b297e75969dd/raw/4b7c7f95ac8e859d998c4cd91b76f7f1eda10b27/z_hostprocess.yaml
Then, enter the container shell:
# get the list of running pod
kubectl get pods -l app=privileged-daemonset -n kube-system -o=custom-columns=NAME:.metadata.name --no-headers
# Get the events
kubectl get events -l app=csi-azuredisk-node -n kube-system
# Get the logs
kubectl logs -l app=csi-azuredisk-node -n kube-system
# az aks create with 1.25+ and `--network-plugin none`
$ az aks create -g $resourceGroup -n $clusterName --kubernets-version 1.25 --network-plugin none
# Install and deploy flannel
$ export podCidrSubnet="10.244.0.0/16"
$ helm repo add flannel https://flannel-io.github.io/flannel/
$ helm install flannel --set podCidr="$podCidrSubnet" --namespace kube-flannel flannel/flannel
# Manually update the pod CIDR subnet for each nodes