云容器实例 CCI-创建RoleBinding:请求示例

时间:2024-11-06 15:35:42

请求示例

创建RoleBinding,将"rbac-test"命名空间中的用户组绑定到名称为"view"的ClusterRole下。

{
  "apiVersion" : "rbac.authorization.k8s.io/v1",
  "kind" : "RoleBinding",
  "metadata" : {
    "name" : "clusterrole_view_User_07b82a44a680d5661f01c00b448f8f50",
    "namespace" : "rbac-test"
  },
  "roleRef" : {
    "apiGroup" : "rbac.authorization.k8s.io",
    "kind" : "ClusterRole",
    "name" : "view"
  },
  "subjects" : [ {
    "apiGroup" : "rbac.authorization.k8s.io",
    "kind" : "User",
    "name" : "07b82a44a680d5661f01c00b448f8f50"
  } ]
}
support.huaweicloud.com/api-cci/createRbacAuthorizationV1NamespacedRoleBinding.html