1

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

spetz83
  • 494
  • 6
  • 21
Noob
  • 11
  • 1
  • 4

1 Answers1

2

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
Adrian David Smith
  • 574
  • 1
  • 4
  • 26
Luiz
  • 21
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 25 '22 at 07:57