Created
December 20, 2022 14:48
-
-
Save henryeleonu/46e8a2505e82ab03d7aef98d50088baa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: The service account `default:default` already exists in k8s cluster. | |
# You can create a new account following like this: | |
#--- | |
#apiVersion: v1 | |
#kind: ServiceAccount | |
#metadata: | |
# name: <new-account-name> | |
# namespace: <namespace> | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: spark-sa | |
namespace: default | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
namespace: default | |
name: spark-role | |
rules: | |
- apiGroups: [""] | |
resources: ["pods", "services", "configmaps", "secrets", "namespaces", "deployments", "jobs", "apiservices"] | |
#resources: [""] | |
verbs: ["create", "get", "watch", "list", "post", "delete", "update", "patch"] | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: spark-role-binding | |
namespace: default | |
subjects: | |
- kind: ServiceAccount | |
name: spark-sa | |
namespace: default | |
#apiGroup: "" | |
roleRef: | |
kind: ClusterRole | |
name: spark-role | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment