kubernetes: kubectl version --short is not working on Client Version: v1.28.4 Server Version: v1.28.1

What happened: $ kubectl version --short error: unknown flag: --short See ‘kubectl version --help’ for usage.

What you expected to happen: As per documentation https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#version, kubectl version --short command should return just the version number.

How to reproduce it (as minimally and precisely as possible): Install Client Version: v1.28.4 Server Version: v1.28.1 and run ‘kubectl version --short’ command

Anything else we need to know?: NA

Environment:

  • Kubernetes client and server versions (use kubectl version): Client Version: v1.28.4 Server Version: v1.28.1
  • Cloud provider or hardware configuration: AWS
  • OS (e.g: cat /etc/os-release): CentOS7.9
  • Containerd latest

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Oof. We probably should have left that flag for compat, but aside from that - @sftim - how do we generate those docs, and why are they not automatic?

Thank you, @andrelaszlo . I’ve updated my script to utilize kubectl version --output=json. I hope the documentation will be revised to reflect this soon.