简体   繁体   中英

I am getting an error while running kubectl version although I installed it by following the documention

kubectl version /home/lenovo/.local/bin/kubectl: line 1: syntax error near unexpected token <' /home/lenovo/.local/bin/kubectl: line 1: NoSuchKey The specified key does not exist.No such object: kubernetes-release/release//bin/linux/amd64/kubectl'

I cleared kubectl from /usr/local/bin

and also from /home/$USER/.local/bin

And run the commands below:

curl -LO "https://dl.k8s.io/release/v1.24.7/bin/linux/amd64/kubectl"

curl -LO "https://dl.k8s.io/v1.24.7/bin/linux/amd64/kubectl.sha256"

echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

sudo install -o root -g root -m 0755 kubectl /home/$USER/.local/bin/kubectl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM