"쿠버네티스 Role"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 6개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;K8s Role
;K8s
;쿠버네티스 Role


<source lang='yaml'>
<syntaxhighlight lang='yaml'>
apiVersion: rbac.authorization.k8s.io/v1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: Role
12번째 줄: 13번째 줄:
   resources: ["pods"]
   resources: ["pods"]
   verbs: ["get", "watch", "list"]
   verbs: ["get", "watch", "list"]
</source>
</syntaxhighlight>
<syntaxhighlight lang='yaml'>
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: pod-and-pod-logs-reader
rules:
- apiGroups: [""]
  resources: ["pods", "pods/log"]
  verbs: ["get", "list"]
</syntaxhighlight>
<syntaxhighlight lang='yaml'>
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: configmap-updater
rules:
- apiGroups: [""]
  resources: ["configmaps"]
  resourceNames: ["my-configmap"]
  verbs: ["update", "get"]
</syntaxhighlight>


==같이 보기==
==같이 보기==
22번째 줄: 46번째 줄:
* https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example
* https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example


[[분류: k8s]]
[[분류: k8s RBAC]]

2024년 2월 20일 (화) 20:09 기준 최신판

1 개요[ | ]

K8s 롤
쿠버네티스 Role
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
  resources: ["pods"]
  verbs: ["get", "watch", "list"]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: pod-and-pod-logs-reader
rules:
- apiGroups: [""]
  resources: ["pods", "pods/log"]
  verbs: ["get", "list"]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: configmap-updater
rules:
- apiGroups: [""]
  resources: ["configmaps"]
  resourceNames: ["my-configmap"]
  verbs: ["update", "get"]

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}