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
Finding local kubectl version either requires timeout or deprecated option (?) #1216
Comments
Prompted by kubernetes/website#33764 |
Is it reasonable to get the client version by running
We could extract the kubectl version like the following:
|
I believed that kubectl version --client -ojson | jq -r .clientVersion.gitVersion
kubectl version -oyaml --client|awk '/gitVersion/{print $2;}' A shame to require external tools (
|
Actually, we could mention that both
are viable options, and let users choose. |
It sounds like this is expected behavior, and that we should document the warning as something for readers to be aware of and ignore if they are deploying v1.24 |
Nope, the deprecated flag is actuall
Yeah that would be great. |
I think people will see that and think that |
Ah that's because |
As discussed on slack, and earlier today during bug scrub, we need to:
@sftim I looked into when you hit 30s timeout, that's when you have invalid kubeconfig pointing to a valid host but wrong port, in all other cases (missing host, missing kubeconfig, invalid host) you should get instant response. /triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
/reopen /remove-lifecycle rotten |
@sftim: Reopened this issue. In response to this:
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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Also see kubernetes/website#39431 |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What happened:
Sample console sessions:
What you expected to happen:
Something like:
kubectl version
shows the client version only.kubectl version --client
does not show any warning.For example:
It's OK to have
kubectl version --include-cluster-info
orkubectl version --remote
show the remote version too.I would also be OK if
kubectl version
only checked the remote version when a current context is explicitly set (no fallback to an implicit server URL).How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
As a project, we need a way for people who are setting up a brand new
kubectl
to confirm that they have a working and currentkubectl
.It's very helpful if this confirmation step doesn't require explaining that there is a warning: it's good practice not to have people become accustomed to seeing and then skipping warning messages.
Environment:
kubectl version
): v1.24.0cat /etc/os-release
): Linux, but relevant to all OSsThe text was updated successfully, but these errors were encountered: