2025-12-16 10:20:31 -07:00
|
|
|
# kubectl version
|
|
|
|
|
|
|
|
|
|
> Print the client and server version information for the current context.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_version/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Print the client and server version information for the current context:
|
|
|
|
|
|
|
|
|
|
`kubectl version`
|
|
|
|
|
|
|
|
|
|
- Print the client version only for the current context:
|
|
|
|
|
|
|
|
|
|
`kubectl version --client`
|
|
|
|
|
|
|
|
|
|
- Output the client and server version information for the current context in JSON:
|
|
|
|
|
|
|
|
|
|
`kubectl version {{[-o|--output]}} json`
|
|
|
|
|
|
|
|
|
|
- Output the client and server version information for the current context in YAML:
|
|
|
|
|
|
|
|
|
|
`kubectl version {{[-o|--output]}} yaml`
|