Skip to content

Commit

Permalink
also create ServiceAccount and RoleBinding
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed May 17, 2022
1 parent f8e0c91 commit 3be4eac
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion k8s-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ spec:
port: 80
targetPort: 2112
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kcount
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kcount-view
subjects:
- kind: ServiceAccount
name: kcount
roleRef:
kind: ClusterRole
name: view # one of the predefined ClusterRoles
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -37,4 +54,4 @@ spec:
args:
- -a
- -d
serviceAccountName: default # CHANGEME
serviceAccountName: kcount

0 comments on commit 3be4eac

Please sign in to comment.