Skip to content

Publishing on Google Cloud

Kamil Mosciszko edited this page Mar 30, 2025 · 1 revision

Deploying Thunder to Google Cloud

This tutorial will guide you through the steps to deploy Thunder to Google Kubernetes Engine (GKE) on Google Cloud using an image from Docker Hub.

Prerequisites

  1. Google Cloud Account: Ensure you have a Google Cloud account. If not, create one here.
  2. Google Cloud SDK: Install the Google Cloud SDK. Instructions can be found here.
  3. Docker: Ensure Docker is installed. Instructions can be found here.
  4. kubectl: Install kubectl command-line tool. Instructions can be found here.

Steps

Step 1: Authenticate with Google Cloud

gcloud auth login
gcloud config set project [YOUR_PROJECT_ID]

Replace [YOUR_PROJECT_ID] with your Google Cloud project ID.

Step 2: Create a GKE Cluster

gcloud container clusters create my-cluster --num-nodes=3

This command creates a GKE cluster named my-cluster with 3 nodes.

Step 3: Set up Docker Authentication

gcloud auth configure-docker

Step 4: Use Image from Docker Hub

We will use the Thunder image available on Docker Hub: raezil/app:latest.

Step 5: Expose the Deployment

Create a service to expose the deployment:

kubectl expose deployment thunder-deployment --type=LoadBalancer --port 80 --target-port 8080

Step 6: Apply Additional Configurations

Apply additional Kubernetes configurations if needed:

kubectl apply -f app-deployment.yaml
kubectl apply -f app-service.yaml
kubectl apply -f app-loadbalancer.yaml
kubectl apply -f hpa.yaml
kubectl apply -f network-policy.yaml
kubectl apply -f pgbouncer-all.yaml

Step 7: Verify the Deployment

Get the external IP of the service:

kubectl get services

Access your application using the external IP.

Conclusion

You have successfully deployed Thunder to Google Cloud using Google Kubernetes Engine and an image from Docker Hub. For more advanced configurations and scaling options, refer to the GKE documentation.