diff --git a/examples/deployment/nginx/nginx-ingress-controller.yaml b/examples/deployment/nginx/nginx-ingress-controller.yaml index c4d47dfec..cf2aa5392 100644 --- a/examples/deployment/nginx/nginx-ingress-controller.yaml +++ b/examples/deployment/nginx/nginx-ingress-controller.yaml @@ -1,3 +1,39 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ingress + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: system:ingress +rules: +- apiGroups: + - "" + resources: ["configmaps","secrets","endpoints","events","services"] + verbs: ["list","watch","create","update","delete","get"] +- apiGroups: + - "" + - "extensions" + resources: ["services","nodes","ingresses","pods"] + verbs: ["list","watch","create","update","delete","get"] + +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: ingress +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:ingress +subjects: + - kind: ServiceAccount + name: ingress + namespace: kube-system + +--- apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -20,6 +56,7 @@ spec: # that said, since hostPort is broken on CNI (https://github.com/kubernetes/kubernetes/issues/31307) we have to use hostNetwork where CNI is used # like with kubeadm # hostNetwork: true + serviceAccountName: ingress terminationGracePeriodSeconds: 60 containers: - image: gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.7