Skip to content

Instantly share code, notes, and snippets.

@Nurlan199206
Created January 18, 2020 14:00
Show Gist options
  • Save Nurlan199206/77a685126ac9165aed37b5ba9e65715e to your computer and use it in GitHub Desktop.
Save Nurlan199206/77a685126ac9165aed37b5ba9e65715e to your computer and use it in GitHub Desktop.
clusterrole create
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: service-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["services"]
verbs: ["get", "watch", "list"]
kubectl create clusterrolebinding default \
--clusterrole=default \
--serviceaccount=default:default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment