See my Medium story for more details
https://medium.com/@ankur.jha/eks-cbb191108a0?sk=57e3988363405be5bc1d24588fcb9c6e
To create a cluster start the script deploy.sh
You should especify one environment:
- nonprod
- mgmt
- prod
./deploy.sh nonprod|mgmt|prod
If you choose the prod
option, the script will ask to you in which aws region must be placed this new cluster:
-
- eu-west-1
The script will automatically create the following:
- Update trust relationship roles to k8s nodes role
- Create helm service account
- Apply RBAC to helm service account
- Initialize helm
- Deploy ALB Controller
- Deploy keel
To get access to a cluster, use the command:
eksctl utils write-kubeconfig --name cluster-name
kubectl apply -f resources/demo.yaml
** PS: This demo is using nonprod
cluster settings, if you want to use in another cluster please remember to change the fields at the ingress section:
-
alb.ingress.kubernetes.io/subnets: #nonprod DMZ subnets
-
`alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:eu-west-1"
-
- host: www.example.com
CLUSTER_NAME="nonprod"
helm delete nginx-ingress --purge
kubectl delete ingress,svc,deployment nginx
eksctl delete cluster --name ${CLUSTER_NAME}