Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 1.56 KB

linux.md

File metadata and controls

53 lines (45 loc) · 1.56 KB

(1) Install Azure CLI and Kubectl

  • Install Azure CLI on Liux (don't use apt install azure-cli directly on WSL, use below script)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
  • Install kubectl using azure cli on Linux (Recommended for AKS)
sudo az aks install-cli
  • kubectl and kubelogin will be downloaded to /usr/local/bin ($PATH)
  • Use below command to modify .kube/config file by adding the login method (Below command uses Azure CLI)
export KUBECONFIG=~/.kube/config
kubelogin convert-kubeconfig -l azurecli

(2) Add auto completion and Set alias for kubectl as k

  • open .bashrc file
vim ~/.bashrc
  • Add following code to .bashrc
source <(kubectl completion bash)
complete -F __start_kubectl k
alias k=kubectl
alias kn='k config set-context --current --namespace'
  • Reload bash profile
source ~/.bashrc

(3) Connect to AKS Node (by running privileged pod on the node)

(4) AKS linux networking command (For Kubenet network pugin)

  • To see the node internal route table (Connect to the node)
  • This displays the routing table which includes entries added by kubenet for routing traffic between pods in the same node
ip route show
  • To see the ARP table
  • Output indicates the pod ips, associated mac and interface
arp -a