Code Monkey home page Code Monkey logo

python-app's Introduction

python-app

Description

This project demonstrates how to deploy a simple REST API application to an Amazon Elastic Kubernetes Service (EKS) cluster on AWS.

Prerequisites

  • An AWS account with appropriate permissions.
  • AWS CLI installed and configured.
  • Docker installed on your local machine.
  • Kubectl installed on your local machine.

Application

The application in this project is a simple REST API that returns a JSON payload with a message and a timestamp.

How to Run

Follow these steps to run the application on an AWS EKS cluster:

1. Clone the Repository

git clone https://github.com/fashinadolapo/python-app.git
cd your-repo-directory

2. Build the Docker Image

Build the Docker image for the application:

docker build -t fashinadolapo/python-app:v1 .

3. Set Up an Amazon EKS Cluster

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

4. Deploy the Application

Apply the Kubernetes deployment and service configuration to your EKS cluster:

kubectl apply -f deployment.yaml

5. Access the Application

To find the external IP of the service:

kubectl get service saint-service

You can access the REST API using the provided IP address.

How to Clean Up

To delete the AWS EKS cluster and associated resources, use the AWS CLI:

eksctl delete cluster --name saint-cluster- --region eu-west-2

python-app's People

Contributors

fashinadolapo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.