Git Product home page Git Product logo

sharadashehan / 3_tier_deployment_gke Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 598 KB

Kubernetes manifests to deploy a flask application with nginx reverse proxy, redis cache and mysql database on Google Kubernetes Engine ensuring high availability and scalablility

Dockerfile 11.52% Python 88.48%
artifact-registry flask-application gke-manifests horizontal-scaling mysql-database nginx redis-cache docker-container

3_tier_deployment_gke's Introduction

Deploying a Fullstack Application with 3-Tier Architecture on Google Kubernetes Engine (GKE)

Architecture Diagram

Steps

  1. Create a new project on Google Cloud Platform (GCP)

  2. Enable the Kubernetes Engine API

  3. Install the Google Cloud SDK on your local machine

  4. Clone the repository and navigate to the backend directory

  5. Login to Google Cloud SDK and set the project

    gcloud auth login
    gcloud config set project YOUR_PROJECT_ID
    
  6. Enable/Install the required services

    gcloud services enable artifactregistry.googleapis.com
    gcloud auth configure-docker
    gcloud components install gke-gcloud-auth-plugin
    
  7. Build the Docker image, replace HOST-NAME, PROJECT-ID, REPOSITORY, and IMAGE with your own values for

    docker build -t HOST-NAME/PROJECT-ID/REPOSITORY/IMAGE:latest .
    
  8. Push the Docker image to Google Artifact Registry

    docker push HOST-NAME/PROJECT-ID/REPOSITORY/IMAGE
    
  9. Create a Kubernetes cluster

  10. Configure kubectl to use the new cluster

    gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE --project PROJECT_ID
    
  11. Enable Gateway API for the cluster

    gcloud container clusters update CLUSTER_NAME --location=ZONE --gateway-api=standard
    
  12. Navigate to the root directory of project, replace <DOCKER_IMAGE>, <MYSQL_PASSWORD>, <MYSQL_DATABASE_NAME> with your own values, and deploy the configuration

    kubectl apply -f deploy.yml
    

3_tier_deployment_gke's People

Contributors

sharadashehan 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.