#Install Kubectlif[ ! -f /usr/local/bin/kubectl ]then sudo curl -fsSL --progress-bar "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl
sudo chmod +x /usr/local/bin/kubectl
fi#Reload zshzsh
#add alias into ~/.zshrdif ! sudo grep -q "kubectl" ~/.zshrc;then cat << EOF |sudo tee -a ~/.zshrc
alias k=kubectl
EOFfizsh
cat ~/.zshrc | grep kubectl
Get Contributer Privilege with PIM
Get the Contributer PIM firstly on azure portal
Login aks
1
2
3
4
5
az login --use-device-code
az account set --subscription YOUR_SUBSCRIPTION
az aks get-credentials --resource-group RESOURCE-GROUP --name AKS-NAME --admin
kubectl config current-context
kubectl get po -A