Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 7 kubectl is too old for the --output argument #7350

Closed
dafydd2277 opened this issue Apr 1, 2020 · 3 comments · Fixed by #7356
Closed

CentOS 7 kubectl is too old for the --output argument #7350

dafydd2277 opened this issue Apr 1, 2020 · 3 comments · Fixed by #7356
Labels
cmd/kubectl Issues with the "kubectl" command kind/support Categorizes issue or PR as a support question. os/linux

Comments

@dafydd2277
Copy link

dafydd2277 commented Apr 1, 2020

CentOS 8 with kubernetes-client-1.5.2-0.7.git269f928.el7.x86_64.rpm

installs a kubectl that does NOT include an "--output" argument. So,

$ kubectl version --client --output=json
Error: unknown flag: --output

Options:
  -c, --client=false: Client version only (no server required).
      --short=false: Print just the version number.

Usage:
  kubectl version [options]

Use "kubectl options" for a list of global command-line options (applies to all commands).

Error: unknown flag: --output

and minikube start ends with

E0331 21:01:18.230181   16751 start.go:383] kubectl info: exec: exit status 1

Since start.go is viewable, I go look at start.go line 383. That points me to the function showKubectlInfo at line 423 , and the exec.Command at line 436. From that, I'm concluding that the error is a false positive due to attempting a deprecated command argument.

@afbjorklund afbjorklund changed the title CentOS8 kubectl has deprecated the --output argument CentOS 7 kubectl is too old for the --output argument Apr 1, 2020
@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 1, 2020

That package is for .el7, and seems to be using Kubernetes 1.5 ?

https://git.centos.org/rpms/kubernetes/blob/c7-extras/f/SPECS/kubernetes.spec

Please install a newer kubectl, or maybe use "minikube kubectl"

@afbjorklund afbjorklund added cmd/kubectl Issues with the "kubectl" command kind/support Categorizes issue or PR as a support question. os/linux needs-solution-message Issues where where offering a solution for an error would be helpful labels Apr 1, 2020
@afbjorklund
Copy link
Collaborator

Improved output:

❗  /usr/local/bin/kubectl is v1.5.2, which may be incompatible with Kubernetes v1.18.0.
💡  You can also use 'minikube kubectl -- get pods' to invoke a matching version
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T04:57:25Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:50:46Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

See: https://kubernetes.io/docs/setup/release/version-skew-policy/

@afbjorklund
Copy link
Collaborator

@tstromberg tstromberg removed the needs-solution-message Issues where where offering a solution for an error would be helpful label Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/kubectl Issues with the "kubectl" command kind/support Categorizes issue or PR as a support question. os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants