Commands:
$ kubectl create rolebinding hxie-rolebinding --role=livesql-apps --user=ocid1.user.oc1..aaaaa...tx5a$ kubectl create clusterrolebinding <my-cluster-admin-binding> --clusterrole=cluster-admin --user=<user_OCID>
Yaml:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBinding
metadata:
creationTimestamp: "2019-10-23T23:24:30Z"
name: hxie_clst_adm
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: ocid1.user.oc1......uvl7ria
Refer doc: https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengaboutaccesscontrol.htm
No comments:
Post a Comment