kube-flannel-rbac.yml 863 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Create the clusterrole and clusterrolebinding:
  2. # $ kubectl create -f kube-flannel-rbac.yml
  3. # Create the pod using the same namespace used by the flannel serviceaccount:
  4. # $ kubectl create --namespace kube-system -f kube-flannel-legacy.yml
  5. ---
  6. kind: ClusterRole
  7. apiVersion: rbac.authorization.k8s.io/v1beta1
  8. metadata:
  9. name: flannel
  10. rules:
  11. - apiGroups:
  12. - ""
  13. resources:
  14. - pods
  15. verbs:
  16. - get
  17. - apiGroups:
  18. - ""
  19. resources:
  20. - nodes
  21. verbs:
  22. - list
  23. - watch
  24. - apiGroups:
  25. - ""
  26. resources:
  27. - nodes/status
  28. verbs:
  29. - patch
  30. ---
  31. kind: ClusterRoleBinding
  32. apiVersion: rbac.authorization.k8s.io/v1beta1
  33. metadata:
  34. name: flannel
  35. roleRef:
  36. apiGroup: rbac.authorization.k8s.io
  37. kind: ClusterRole
  38. name: flannel
  39. subjects:
  40. - kind: ServiceAccount
  41. name: flannel
  42. namespace: kube-system