training
This commit is contained in:
14
training/rbac/pod.yaml
Normal file
14
training/rbac/pod.yaml
Normal 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
12
training/rbac/rb.yaml
Normal 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
13
training/rbac/role.yaml
Normal 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
4
training/rbac/sa.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: demo
|
||||
Reference in New Issue
Block a user