📅  最后修改于: 2023-12-03 15:32:31.779000             🧑  作者: Mango
kubectl
is a command-line tool used to manage Kubernetes clusters. In this article, we will cover the steps to install kubectl
on a system using the Shell-Bash
script.
Before you begin, ensure that you have the following prerequisites:
Follow the below steps to install kubectl
using Shell-Bash
:
kubectl
binary using the curl
command:curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
This command will download the latest version of kubectl
for Linux.
kubectl
binary executable using the chmod
command:chmod +x ./kubectl
kubectl
binary to a directory in your system PATH, so it can be easily executed:sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version
command:kubectl version
This command will show you the version of kubectl
that was installed on your system.
In this article, we covered the steps to install kubectl
on a system using Shell-Bash
. Now you can manage your Kubernetes clusters using kubectl
on your system.