This commit is contained in:
thomas
2026-09-03 13:41:35 +00:00
parent 24b9717db2
commit f929a46d2b
9 changed files with 90 additions and 1 deletions

14
training/rbac/pod.yaml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
labels:
run: shell
name: shell
spec:
serviceAccount: demo
containers:
- image: ghcr.io/trion-development/kubectl:1
name: shell
tty: true
resources: {}

12
training/rbac/rb.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pod-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-reader
subjects:
- kind: ServiceAccount
name: demo
namespace: default

13
training/rbac/role.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-reader
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch

4
training/rbac/sa.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: demo