-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathcreate-eks.sh
More file actions
executable file
·30 lines (21 loc) · 948 Bytes
/
create-eks.sh
File metadata and controls
executable file
·30 lines (21 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
CLUSTER_NAME=temporal-oms
echo "Creating cluster: '$CLUSTER_NAME'..."
eksctl create cluster --name $CLUSTER_NAME
echo "Configuring ebs-csi-driver for volume storage..."
eksctl utils associate-iam-oidc-provider --region=us-west-2 --cluster=$CLUSTER_NAME --approve
eksctl create iamserviceaccount \
--name ebs-csi-controller-sa \
--namespace kube-system \
--cluster $CLUSTER_NAME \
--role-name AmazonEKS_EBS_CSI_DriverRole \
--role-only \
--attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
--approve
eksctl create addon \
--name aws-ebs-csi-driver \
--cluster $CLUSTER_NAME \
--service-account-role-arn arn:aws:iam::$(aws sts get-caller-identity --query Account --output text):role/AmazonEKS_EBS_CSI_DriverRole \
--force
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
echo "Done."