add the rbac support
add the k8s's rbac support
This commit is contained in:
parent
b6d11caef3
commit
52cb7e2ec1
1 changed files with 37 additions and 0 deletions
|
@ -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
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
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
|
# 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
|
# like with kubeadm
|
||||||
# hostNetwork: true
|
# hostNetwork: true
|
||||||
|
serviceAccountName: ingress
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 60
|
||||||
containers:
|
containers:
|
||||||
- image: gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.5
|
- image: gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.5
|
||||||
|
|
Loading…
Reference in a new issue