Closed pl4g4 closed 11 months ago
I can confirm that this flag is deprecated.
Just remove the --short
flag and you'll get the same output.
If you want to have the client version only, use kubectl version --client
.
I fixed it using kubectl 1.23.0:
curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --short
Same issue in here. The --short
is deprecated
$ kubectl version
Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
$ kubectl version --short
error: unknown flag: --short
See 'kubectl version --help' for usage.
I had some issues when I tried to set this up.
I'm getting the error
~/kubernetes-goat$ bash setup-kubernetes-goat.sh - Error: Could not find kubectl or an other error happened, please check kubectl setup.
It looks like the command in the set up and access script
kubectl version --short > /dev/null 2>&1
is always returning the error with kubectl not set up.I had to comment it out so the script could run.
If I run that command and remove the /dev/null this is what it returns.
This is what I run when I'm installing Kubectl
So
short
flag would probably need to be removed.Is anyone else having the same issue?