We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e2d3e6 commit 68704f3Copy full SHA for 68704f3
scripts/2_setup_kubernetes.sh
@@ -33,6 +33,25 @@ function setup_kubectl {
33
cp -i /etc/kubernetes/admin.conf /root/.kube/config
34
35
aws s3 cp /etc/kubernetes/admin.conf s3://$(cat /etc/terraform/s3_bucket) --region eu-central-1
36
+
37
+ kubectl create serviceaccount cluster-admin -n kube-system
38
+ cat <<EOF >/tmp/cluster-admin.yaml
39
+ apiVersion: rbac.authorization.k8s.io/v1beta1
40
+ kind: ClusterRoleBinding
41
+ metadata:
42
+ name: cluster-admin
43
+ labels:
44
+ k8s-app: cluster-admin
45
+ roleRef:
46
+ apiGroup: rbac.authorization.k8s.io
47
+ kind: ClusterRole
48
49
+ subjects:
50
+ - kind: ServiceAccount
51
52
+ namespace: kube-system
53
+EOF
54
+ su ubuntu -c "kubectl apply -f /tmp/cluster-admin.yaml" -n kube-system
55
}
56
57
function setup_network {
0 commit comments