Skip to content

Print the supported API resources along with groups/versions on the server

License

Notifications You must be signed in to change notification settings

chengshiwen/kubectl-resource-versions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubectl-resource-versions

Go Report Card LICENSE Releases GitHub stars

kubectl-resource-versions - This kubectl plugin prints the API resources along with the supported API versions in the form of group/version on the server

Intro

Have you ever wondered which api group and version should be used for a specified resource on a provided kubernetes cluster?

In one deployment definition you could see this apiVersion: apps/v1beta2, and in another apiVersion: apps/v1. Which one is correct? Which you should use? How to check which are supported on your Kubernetes cluster?

It is useful to find out the API resources along with the supported API versions in the form of group/version on the server as shown below.

kubectl-resource-versions example

Install

Binary downloads of the kubectl-resource-versions can be found on the Releases page.

Unpack the kubectl-resource-versions binary and add it to your PATH and you are good to go!

If you want to use the kubectl plugins package manager Krew, just run

$ kubectl krew install resource-versions

Tips: Installing Krew is required first

Usage

$ kubectl-resource-versions --help
# or
$ kubectl resource-versions --help

Print the API resources along with the supported API versions in the form of group/version on the server

Usage:
  kubectl-resource-versions [flags]

Examples:
  # Print the API resources with the supported API versions
  kubectl-resource-versions
  # Print by kubectl plugin
  kubectl resource-versions

Flags:
  -h, --help                help for kubectl-resource-versions
      --kubeconfig string   path to the kubeconfig file to use for CLI requests (default "$HOME/.kube/config")
  -v, --version             version for kubectl-resource-versions

Reference

Kubernetes API Resources: Which Group and Version to Use?

About

Print the supported API resources along with groups/versions on the server

Resources

License

Stars

Watchers

Forks