faith丶

导航

k8s获取apiversion下面的对应可用资源

1、kubectl获取api命令

kubectl api-versions
输出如下:
apps/v1beta1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1beta1
autoscaling/v1
batch/v1
certificates.k8s.io/v1alpha1
extensions/v1beta1
policy/v1beta1
rbac.authorization.k8s.io/v1alpha1
storage.k8s.io/v1beta1
v1

2、curl获取api命令

[注:以下命令的url地址http://127.0.0.1/为k8s master的地址]
curl http://127.0.0.1:8080/apis|grep groupVersion|cut -d: -f2|sort|uniq -c|cut -d\" -f2 输出如下: apps/v1beta1 authentication.k8s.io/v1beta1 authorization.k8s.io/v1beta1 autoscaling/v1 batch/v1 certificates.k8s.io/v1alpha1 extensions/v1beta1 policy/v1beta1 rbac.authorization.k8s.io/v1alpha1 storage.k8s.io/v1beta1

posted on 2020-01-06 16:38  faith丶  阅读(1727)  评论(0编辑  收藏  举报