Skip to content

Instantly share code, notes, and snippets.

@diegs
Last active September 25, 2020 21:13
Show Gist options
  • Select an option

  • Save diegs/1635eee39edaf59bc5a8c0e2d3d8e458 to your computer and use it in GitHub Desktop.

Select an option

Save diegs/1635eee39edaf59bc5a8c0e2d3d8e458 to your computer and use it in GitHub Desktop.
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: healthz-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: healthz-reader
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: healthz-reader
rules:
- nonResourceURLs: ["/healthz", "/healthz/*"] # '*' in a nonResourceURL is a suffix glob match
verbs: ["get", "post"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment