Article
Sep 29, 2025
How to Set Up a GKE Cluster on Google Cloud (Step‑by‑Step)
A complete step-by-step guide to setting up a Google Kubernetes Engine (GKE) cluster on Google Cloud. Learn how to create your cluster, connect with kubectl, deploy a sample app, and enable HTTPS with a managed certificate.
What You’ll Build
A GKE Autopilot cluster (or Standard option)
kubectl
access from your machineA sample app exposed with a LoadBalancer
(Optional) HTTPS with ManagedCertificate + Ingress
Prerequisites
A Google Cloud project with billing enabled
Installed: gcloud CLI and kubectl
(Optional) A domain name you control for HTTPS
Set your working variables (customize these values):
1) Authenticate and Select Project
Enable required APIs:
2) Create a GKE Autopilot Cluster (Recommended)
✅ Autopilot bills by Pod usage and manages nodes for you.
(Optional) Standard Cluster
3) Get Cluster Credentials
You should see nodes in the Ready state.
4) Deploy a Sample App
Visit the EXTERNAL-IP
shown to test the app.
5) (Optional) Enable HTTPS
Reserve a static IP:
Create Ingress + ManagedCertificate:
Apply it:
When status = Active, test https://demo.example.com
.
6) Basic RBAC & Namespace Hygiene
7) Clean Up
Troubleshooting
Permission errors: Ensure you enabled
container.googleapis.com
and haveroles/container.admin
.LB stuck Pending: Check quotas and confirm your region supports GCLB.
Wrong context: Run
kubectl config get-contexts
and re-runget-credentials
.