This repository is intended to host all the files necessary for deploying AWS resources and configuring them in order to contain a Kubernetes cluster (1 master & 2 worker nodes)
Just run the deploy-cluster.sh command and it should work. You need the following Environment variables set:
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
export CLOUDFLARE_TOKEN=<CLOUDFLARE_DNS_EDIT_TOKEN>
The following need to be covered:
- Deploy custom VPC and subnet (include public IP and DNS entry)
- Route tables and Internet Gateways
- Security Groups (for control plane & worker nodes)
- Deploy master, worker nodes and SSH public key for access (t3.medium should be minimum)
- Disable swap, configure hostname, set system clock
- Deploy kubeadm
- Create Kubernetes nodes and register cluster
- Add demo nginx application
- Add Prometheus & Grafana deployments
- Add Ingress controller (using nginx-ingress-controller)
- Add ALB resource for load balancing the web application (currently using a classic EC2 load balancer - ELB)
- Add record for ALB in domain DNS server (managed externally)
- Create script to execute ansible playbooks
- Add script to execute all steps necessary to create a working cluster with Ingress (see deploy-cluster.sh)
- Add ansible task to copy kube-config file from master node & edit for external use
- Add persistent storage for pods
- Add support for LoadBalancer resources (see the MetalLB project, then go to Installation page; in this case, nginx-ingress-controller can be switched to the cloud variant, but it should not interfere with the baremetal implementation which uses NodePort)
- Create an ECR to store a custom image to show the running host
- Migrate to Terragrunt for eliminating duplicate code