Skip to content

Instantly share code, notes, and snippets.

@Elektordi
Created July 9, 2023 21:46
Show Gist options
  • Save Elektordi/715212c7d0d7dd39775074236e4b07fc to your computer and use it in GitHub Desktop.
Save Elektordi/715212c7d0d7dd39775074236e4b07fc to your computer and use it in GitHub Desktop.
Kube RBAC for healthz endpoints
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: healthz
rules:
- nonResourceURLs: ["/healthz", "/livez", "/readyz"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: healthz
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: healthz
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment