kube-flannel-rbac.yml 778 B

12345678910111213141516171819202122232425262728293031323334353637
  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.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. - update
  24. - watch
  25. ---
  26. kind: ClusterRoleBinding
  27. apiVersion: rbac.authorization.k8s.io/v1beta1
  28. metadata:
  29. name: flannel
  30. roleRef:
  31. apiGroup: rbac.authorization.k8s.io
  32. kind: ClusterRole
  33. name: flannel
  34. subjects:
  35. - kind: ServiceAccount
  36. name: flannel
  37. namespace: kube-system