--- apiVersion: v1 kind: ServiceAccount metadata: name: jenkins --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: jenkins rules: - apiGroups: [""] resources: ["pods"] verbs: ["create","delete","get","list","patch","update","watch"] - apiGroups: [""] resources: ["pods/exec"] verbs: ["create","delete","get","list","patch","update","watch"] - apiGroups: [""] resources: ["pods/log"] verbs: ["get","list","watch"] - apiGroups: [""] resources: ["secrets"] verbs: ["create","delete","get","list","patch","update"] - apiGroups: [""] resources: ["configmaps"] verbs: ["create","delete","get","list","patch","update"] - apiGroups: ["apps"] resources: ["deployments"] verbs: ["create","delete","get","list","patch","update"] - apiGroups: [""] resources: ["services"] verbs: ["create","delete","get","list","patch","update"] - apiGroups: [""] resources: ["ingresses"] verbs: ["create","delete","get","list","patch","update"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: jenkins roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: jenkins subjects: - kind: ServiceAccount name: jenkins namespace: jenkins