Skip to main content

kubectl CLI

install kubectl command

wget https://grstatic.oss-cn-shanghai.aliyuncs.com/binary/kubectl -O /usr/bin/kubectl
chmod +x /usr/bin/kubectl

image-20210219183628565

As shown in the figure above, Copy the kubeconfig file from the cluster list and write it to the path~/.kube/config.

mkdir ~/.kube/
vi ~/.kube/config

After the installation is complete, execute the following command, if the code is installed successfully:

kubectl get node