This project demonstrates how to deploy a simple REST API application to an Amazon Elastic Kubernetes Service (EKS) cluster on AWS.
- An AWS account with appropriate permissions.
- AWS CLI installed and configured.
- Docker installed on your local machine.
- Kubectl installed on your local machine.
The application in this project is a simple REST API that returns a JSON payload with a message and a timestamp.
Follow these steps to run the application on an AWS EKS cluster:
git clone https://github.com/fashinadolapo/python-app.git
cd your-repo-directory
Build the Docker image for the application:
docker build -t fashinadolapo/python-app:v1 .
Create an Amazon EKS cluster using the AWS CLI. Replace placeholders with your specific configuration:
eksctl create cluster --name saint-cluster --region eu-west-2 --nodegroup-name standard-workers --node-type t2-micro --nodes 3
Apply the Kubernetes deployment and service configuration to your EKS cluster:
kubectl apply -f deployment.yaml
To find the external IP of the service:
kubectl get service saint-service
You can access the REST API using the provided IP address.
To delete the AWS EKS cluster and associated resources, use the AWS CLI:
eksctl delete cluster --name saint-cluster- --region eu-west-2