apt-get install -y kubectl kubectl code example
Example 1: kubectl install on ubuntu
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
Example 2: install kubectl ubuntu
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl