Skip to content

Instantly share code, notes, and snippets.

@aolwas
Created April 8, 2017 08:12
Show Gist options
  • Save aolwas/438fbf568bc25c57380ee79278de44d1 to your computer and use it in GitHub Desktop.
Save aolwas/438fbf568bc25c57380ee79278de44d1 to your computer and use it in GitHub Desktop.
Kubernetes RBAC manifest for Traefik ingress controller
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: default
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: traefik-ingress-controller
subjects:
- kind: ServiceAccount
name: traefik-ingress-controller
namespace: default
@aolwas
Copy link
Author

aolwas commented Apr 8, 2017

You also need to add serviceAccountName: traefik-ingress-controller to your traefik-ingress-controller pod spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment