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

Incompatible kubectl version warning is misleading #6320

Closed
steinybot opened this issue Jan 15, 2020 · 9 comments
Closed

Incompatible kubectl version warning is misleading #6320

steinybot opened this issue Jan 15, 2020 · 9 comments
Labels
co/kubectl kubectl related bugs kind/documentation Categorizes issue or PR as related to documentation. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@steinybot
Copy link

Using minikube 1.6.2, kubernetes-cli 1.17.0 and trying to start a cluster with Kubernetes version 1.15.3 it produces a misleading warning:

⚠️  /usr/local/bin/kubectl is version 1.17.0, and is incompatible with Kubernetes 1.15.3. You will need to update /usr/local/bin/kubectl or use 'minikube kubectl' to connect with this cluster

This is misleading because "updating" /usr/local/bin/kubectl will not fix the problem.

It should say "downgrade" rather than "update".

The exact command to reproduce the issue:

minikube start --kubernetes-version=1.15.3

The full output of the command that failed:

😄  [observability] minikube v1.6.2 on Darwin 10.14.6
    ▪ MINIKUBE_PROFILE=observability
    ▪ MINIKUBE_KUBERNETES_VERSION=1.15.3
✨  Selecting 'hyperkit' driver from existing profile (alternates: [virtualbox])
👍  Kubernetes 1.17.0 is now available. If you would like to upgrade, specify: --kubernetes-version=1.17.0
🔄  Starting existing hyperkit VM for "observability" ...
⌛  Waiting for the host to be provisioned ...
🐳  Preparing Kubernetes v1.15.3 on Docker '19.03.5' ...
    ▪ kubelet.authentication-token-webhook=true
    ▪ kubelet.authorization-mode=Webhook
    ▪ scheduler.address=0.0.0.0
    ▪ controller-manager.address=0.0.0.0
🚀  Launching Kubernetes ...
💗  To connect to this cluster, use: kubectl --context=observability
⚠️  /usr/local/bin/kubectl is version 1.17.0, and is incompatible with Kubernetes 1.15.3. You will need to update /usr/local/bin/kubectl or use 'minikube kubectl' to connect with this cluster

The output of the minikube logs command:

The operating system version:

macOS 10.14.6 (18G103)

@steinybot
Copy link
Author

Looks to have originally been implemented in #3329

@afbjorklund
Copy link
Collaborator

I guess "change" might be less ambiguous than "update" (which rhymes with upgrade) ?

Kubernetes only guarantees clients to differ by one major version, so warning itself is OK.

@afbjorklund afbjorklund added co/kubectl kubectl related bugs kind/documentation Categorizes issue or PR as related to documentation. labels Jan 15, 2020
@medyagh medyagh added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jan 22, 2020
@medyagh
Copy link
Member

medyagh commented Jan 22, 2020

I would accept a PR that would change this wording to be less confusing. as @afbjorklund suggests

@tstromberg
Copy link
Contributor

Fixed in v1.9. Message now says:

❗  /usr/local/bin/kubectl is v1.16.3, which may be incompatible with Kubernetes v1.18.0.
💡  You can also use 'minikube kubectl -- get pods' to invoke a matching version

@khiemnd5
Copy link

khiemnd5 commented May 7, 2020

@tstromberg I had still this problem
image

@steinybot
Copy link
Author

@khiemnd5 That appears to be working as expected. What did you expect to happen instead?

@medyagh
Copy link
Member

medyagh commented May 13, 2020

@khiemnd5 that is the right message that kubernetes is giving you, if you wanna all the pods you can try
minikube kubectl -- get pods -A

@khiemnd5
Copy link

@medyagh ok. I see. Thank you! :D

@EricoCartmanez
Copy link

So to upgrade kubectl on mac:
brew upgrade kubectl

Then you 'll probably need: brew link --overwrite kubernetes-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kubectl kubectl related bugs kind/documentation Categorizes issue or PR as related to documentation. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

6 participants