Skip to content

Instantly share code, notes, and snippets.

@shohi
Created March 2, 2020 07:24
Show Gist options
  • Save shohi/2e69728f81833cf0e6a6ad846fdf193f to your computer and use it in GitHub Desktop.
Save shohi/2e69728f81833cf0e6a6ad846fdf193f to your computer and use it in GitHub Desktop.
# copy from https://stackoverflow.com/questions/54154112/kubernetes-granting-rbac-access-to-anonymous-users-in-kube-dns
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: anonymous-role
rules:
- apiGroups: [""]
resources: ["services/proxy"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: anonymous-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: anonymous-role
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:anonymous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment