Elastic Kubernetes Service (EKS) is a fully managed Kubernetes service from AWS. In this lab, you will work with the AWS command-line interface and console, using command-line utilities like `eksctl` and `kubectl` to launch an EKS cluster, provision a Kubernetes Deployment and Pod running instances of `nginx`, and create a `LoadBalancer` Service to expose your application over the internet.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log In to the Provided EC2 Instance
Log in to the EC2 instance provided in the lab environment using the public IP address,
cloud_user
username, and password provided in the lab interface.- Provision an EKS Cluster
Use
eksctl
to provision an EKS cluster with three worker nodes inus-east-1
.
Use Kubernetes version1.16
or later.- Create a Deployment on Your EKS Cluster
Using
kubectl
and the provided Service and Deployment definition files provided in the EKS Basics GitHub repository:- Create a
LoadBalancer
Service. - Check the status of your
LoadBalancer
Service usingkubectl
. - Create an NGINX Deployment.
- Check the status of your cluster, Deployment, and Pods using
kubectl
. - When NGINX is up and running, check that you can access your application using the DNS name of the
LoadBalancer
provided in thekubectl get service
output.
- Create a
- Test the High Availability Features of Your EKS Cluster
- In the EC2 console, terminate all the worker nodes.
- Check the status of your cluster, Deployment, and Pods using
kubectl
. After a few minutes, you should see EKS launching new instances to keep your Service running. - When the cluster is back to a steady state, check that your application is up and running using
curl
.