-
Create a new project on Google Cloud Platform (GCP)
-
Enable the Kubernetes Engine API
-
Install the Google Cloud SDK on your local machine
-
Clone the repository and navigate to the backend directory
-
Login to Google Cloud SDK and set the project
gcloud auth login gcloud config set project YOUR_PROJECT_ID
-
Enable/Install the required services
gcloud services enable artifactregistry.googleapis.com gcloud auth configure-docker gcloud components install gke-gcloud-auth-plugin
-
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 .
-
Push the Docker image to Google Artifact Registry
docker push HOST-NAME/PROJECT-ID/REPOSITORY/IMAGE
-
Create a Kubernetes cluster
-
Configure kubectl to use the new cluster
gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE --project PROJECT_ID
-
Enable Gateway API for the cluster
gcloud container clusters update CLUSTER_NAME --location=ZONE --gateway-api=standard
-
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
SharadaShehan/3_Tier_Deployment_GKE
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
Python