-
Notifications
You must be signed in to change notification settings - Fork 3
Publishing on Google Cloud
Kamil Mosciszko edited this page Mar 30, 2025
·
1 revision
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.
- Google Cloud Account: Ensure you have a Google Cloud account. If not, create one here.
- Google Cloud SDK: Install the Google Cloud SDK. Instructions can be found here.
- Docker: Ensure Docker is installed. Instructions can be found here.
-
kubectl: Install
kubectlcommand-line tool. Instructions can be found here.
gcloud auth login
gcloud config set project [YOUR_PROJECT_ID]Replace [YOUR_PROJECT_ID] with your Google Cloud project ID.
gcloud container clusters create my-cluster --num-nodes=3This command creates a GKE cluster named my-cluster with 3 nodes.
gcloud auth configure-dockerWe will use the Thunder image available on Docker Hub: raezil/app:latest.
Create a service to expose the deployment:
kubectl expose deployment thunder-deployment --type=LoadBalancer --port 80 --target-port 8080Apply 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.yamlGet the external IP of the service:
kubectl get servicesAccess your application using the external IP.
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.