sample-apiserver: Add RBAC roles and ClusterRoleBindings for Admission Webhooks

parent b005f2fb
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sample-apiserver-clusterrolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: aggregated-apiserver-clusterrole
subjects:
- kind: ServiceAccount
name: apiserver
namespace: wardle
\ No newline at end of file
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: aggregated-apiserver-clusterrole
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "watch", "list"]
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
verbs: ["get", "watch", "list"]
\ No newline at end of file
...@@ -78,6 +78,10 @@ kubectl create -f artifacts/example/sa.yaml -n wardle ...@@ -78,6 +78,10 @@ kubectl create -f artifacts/example/sa.yaml -n wardle
kubectl create -f artifacts/example/auth-delegator.yaml -n kube-system kubectl create -f artifacts/example/auth-delegator.yaml -n kube-system
kubectl create -f artifacts/example/auth-reader.yaml -n kube-system kubectl create -f artifacts/example/auth-reader.yaml -n kube-system
# create rbac roles and clusterrolebinding that allow the service account user to use admission webhooks
kubectl create -f artifacts/example/rbac.yaml
kubectl create -f artifacts/example/rbac-bind.yaml
# create the service and replication controller # create the service and replication controller
kubectl create -f artifacts/example/rc.yaml -n wardle kubectl create -f artifacts/example/rc.yaml -n wardle
kubectl create -f artifacts/example/service.yaml -n wardle kubectl create -f artifacts/example/service.yaml -n wardle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment