Rotor Studios interview challenge
- The script cluster_destroy.sh is to be configured on a Linux based server.
- The script cluster_destroy.sh is to be scheduled to run at 1 AM everyday.
This is achieved using the Loadbalancer service available on AWS
- Create the resource, kubernetes_service to route traffic from the Loadbalancer to the pods running behind it. Refer to the file kubernetes.tf for more details.
- Ensure to use the matching selector for the pods
- Expose the target port that matches the container port specified in the kubernetes_deployment resource.
- Once the loadbalancer is created, fetch the DNS name from the Loadbalancer to access the application.
AmazonEKSClusterPolicy AmazonEKSWorkerNodePolicy AmazonVPCFullAccess (In a real world scenario, it would be recommended to use custom policies to specify the roles explicitly)