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

Confusing kubectl version compatibility warning #17440

Closed
Aseiide opened this issue Oct 17, 2023 · 9 comments
Closed

Confusing kubectl version compatibility warning #17440

Aseiide opened this issue Oct 17, 2023 · 9 comments
Labels
cmd/kubectl Issues with the "kubectl" command kind/documentation Categorizes issue or PR as related to documentation. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@Aseiide
Copy link

Aseiide commented Oct 17, 2023

What Happened?

steps to reproduce the issue

  1. execute minikube start
πŸ˜„  minikube v1.31.2 on Darwin 13.4
✨  Using the hyperkit driver based on existing profile
πŸ‘  Starting control plane node minikube in cluster minikube
πŸƒ  Updating the running hyperkit "minikube" VM ...
❗  This VM is having trouble accessing https://registry.k8s.io
πŸ’‘  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
🐳  Preparing Kubernetes v1.27.4 on Docker 24.0.4 ...
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
πŸ”Ž  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.24.1, which may have incompatibilities with Kubernetes 1.27.4.
    β–ͺ Want kubectl v1.27.4? Try 'minikube kubectl -- get pods -A'
πŸ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
  1. execute minikube kubectl -- get pods -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS       AGE
kube-system   coredns-5d78c9869d-6mb8m           1/1     Running   5 (13m ago)    30h
kube-system   etcd-minikube                      1/1     Running   2 (13m ago)    30h
kube-system   kube-apiserver-minikube            1/1     Running   3 (12m ago)    30h
kube-system   kube-controller-manager-minikube   1/1     Running   2 (13m ago)    30h
kube-system   kube-proxy-fpsgn                   1/1     Running   2 (13m ago)    30h
kube-system   kube-scheduler-minikube            1/1     Running   2 (13m ago)    30h
kube-system   storage-provisioner                1/1     Running   20 (13m ago)   30h

issue

❗  /usr/local/bin/kubectl is version 1.24.1, which may have incompatibilities with Kubernetes 1.27.4.
    β–ͺ Want kubectl v1.27.4? Try 'minikube kubectl -- get pods -A'

The above warning appears, but executing minikube kubectl -- get pods -A only allows us to check the status of the pods and does not resolve the compatibility issue.
This can confuse users about whether they should proceed to the next step or first resolve the compatibility issue.

suggestion

How about changing the command to something like kubectl version --output=yaml to check the kubectl version?

like this↓

❗  /usr/local/bin/kubectl is version 1.24.1, which may have incompatibilities with Kubernetes 1.27.4.
    β–ͺ Want kubectl v1.27.4? Try 'kubectl version --output=yaml'

environment

  • OS: macOS Ventura13.4
  • kubernetes: v1.27.4
  • kubectl:
clientVersion:
  buildDate: "2022-05-24T12:26:19Z"
  compiler: gc
  gitCommit: 3ddd0f45aa91e2f30c70734b175631bec5b5825a
  gitTreeState: clean
  gitVersion: v1.24.1
  goVersion: go1.18.2
  major: "1"
  minor: "24"
  platform: darwin/amd64
kustomizeVersion: v4.5.4

Attach the log file

log.txt

Operating System

None

Driver

None

@afbjorklund
Copy link
Collaborator

Why yaml? User can continue to use minikube kubectl -- if they want.

But we should link to the official kubectl installation docs too

@Aseiide
Copy link
Author

Aseiide commented Oct 18, 2023

@afbjorklund
thank you for your reply.

Why yaml?

I only knew the kubectl version --output=yaml command.
But now I know there is kubectl version --short.

But we should link to the official kubectl installation docs too

Yes, I think so too.
I think we should link to the kubectl installation.

linux: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
macOS: https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/
windows: https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/

@afbjorklund
Copy link
Collaborator

afbjorklund commented Oct 18, 2023

Or just kubectl version, without any extra flags

@afbjorklund
Copy link
Collaborator

Note that minikube kubectl runs the command.

While kubectl version just outputs some text...

@Aseiide
Copy link
Author

Aseiide commented Oct 18, 2023

I see..
I'm a newbie and was confused the first time I used minikube, so I created this issue

@afbjorklund afbjorklund added kind/documentation Categorizes issue or PR as related to documentation. cmd/kubectl Issues with the "kubectl" command labels Nov 19, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 17, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 18, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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/documentation Categorizes issue or PR as related to documentation. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants