Created
November 1, 2020 22:11
-
-
Save antitree/7a2461207259eb36f46ec250eef91ab1 to your computer and use it in GitHub Desktop.
POC for setting up an environment with a secret and cluster role.
This file contains hidden or 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
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: poc-list-bypass | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- secrets | |
verbs: | |
- list | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: poc-list-bypass | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: poc-list-bypass | |
subjects: | |
- kind: ServiceAccount | |
name: poc-list-bypass-sa | |
namespace: default | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: poc-list-bypass-sa | |
namespace: default | |
--- | |
apiVersion: v1 | |
data: | |
mysecret: a3ViZXJuZXRlcyBMSVNUIHZlcmIgaXMgYSBsaWU= | |
kind: Secret | |
metadata: | |
name: ultra-secret-string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment