Kubernetes – How to know latest supported API version

For getting a list of all the resource types and their latest supported version, run the following:

for kind in `kubectl api-resources | tail +2 | awk '{ print $1 }'`; do kubectl explain $kind; done | grep -e "KIND:" -e "VERSION:"

It should produce output like

KIND:     Binding
VERSION:  v1
KIND:     ComponentStatus
VERSION:  v1
KIND:     ConfigMap
VERSION:  v1
KIND:     Endpoints
VERSION:  v1
KIND:     Event
VERSION:  v1
...

As @Rico mentioned, they key is in the kubectl explain command. This may be a little fragile since it depends on the format of the printed output, but it works for kubernetes 1.9.6

Also, the information can be gathered in a less efficient way from the kubernetes API docs (with links for each version) found here – https://kubernetes.io/docs/reference/#api-reference

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)