gpt4 book ai didi

kubernetes - 在哪里可以获得 Kubernetes API 资源和子资源的列表?

转载 作者:行者123 更新时间:2023-12-04 01:25:37 26 4
gpt4 key购买 nike

我正在尝试以最宽松的方式配置 Kubernetes RBAC,并且我想将我的角色范围限定为特定资源和子资源。我已经翻阅了文档,但找不到资源及其子资源的简明列表。

我对管理部署规范一部分的子资源特别感兴趣——容器镜像。

最佳答案

使用 kubectl api-resources -o wide显示所有 资源 , 动词 和相关 API-group .

$ kubectl api-resources -o wide
NAME SHORTNAMES APIGROUP NAMESPACED KIND VERBS
bindings true Binding [create]
componentstatuses cs false ComponentStatus [get list]
configmaps cm true ConfigMap [create delete deletecollection get list patch update watch]
endpoints ep true Endpoints [create delete deletecollection get list patch update watch]
events ev true Event [create delete deletecollection get list patch update watch]
limitranges limits true LimitRange [create delete deletecollection get list patch update watch]
namespaces ns false Namespace [create delete get list patch update watch]
nodes no false Node [create delete deletecollection get list patch update watch]
persistentvolumeclaims pvc true PersistentVolumeClaim [create delete deletecollection get list patch update watch]
persistentvolumes pv false PersistentVolume [create delete deletecollection get list patch update watch]
pods po true Pod [create delete deletecollection get list patch update watch]
statefulsets sts apps true StatefulSet [create delete deletecollection get list patch update watch]
meshpolicies authentication.istio.io false MeshPolicy [delete deletecollection get list patch create update watch]
policies authentication.istio.io true Policy [delete deletecollection get list patch create update watch]
...
...

我想您可以使用它来创建 RBAC 配置中所需的资源列表

关于kubernetes - 在哪里可以获得 Kubernetes API 资源和子资源的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49396607/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com