GKE
KSail supports Google Kubernetes Engine (GKE) as a managed Kubernetes distribution via the Google Cloud SDK. A declarative gke.yaml cluster specification defines the cluster shape; KSail provisions it and manages its lifecycle with the same commands used for local clusters.
GKE is the only distribution that uses the GCP provider. It is a cloud distribution — local mirror registries and local registry containers are not supported.
When to Use GKE
Section titled “When to Use GKE”GKE is ideal when you:
- Need a managed Google Cloud Kubernetes cluster with full cloud integrations (Cloud Load Balancing, Persistent Disk, VPC-native networking)
- Want to use the same KSail workflow (init → create → delete) for cloud clusters
- Require GitOps workflows (Flux or ArgoCD) on managed Google Cloud infrastructure
For local development and testing, consider the Vanilla, K3s, or VCluster distributions instead.
What GKE Provides by Default
Section titled “What GKE Provides by Default”| Component | Status | Details |
|---|---|---|
| CNI | Built-in | GKE VPC-native networking |
| CSI | Built-in | GCP Persistent Disk CSI driver |
| LoadBalancer | Built-in | Google-managed Service type LoadBalancer support |
| Metrics Server | Built-in | Provided by GKE |
Quick Start
Section titled “Quick Start”1. Initialize a GKE Project
Section titled “1. Initialize a GKE Project”mkdir my-gke-clustercd my-gke-cluster
ksail project init \ --name gke-default \ --distribution GKE \ --provider GCPThis generates:
ksail.yaml— KSail cluster configurationk8s/kustomization.yaml— directory for Kubernetes manifests
No gke.yaml is scaffolded — you author it when creating a cluster (see below).
2. Author gke.yaml
Section titled “2. Author gke.yaml”gke.yaml is a GKE Cluster in YAML, using the API’s camelCase field names. A minimal example:
name: gke-defaultlocation: europe-north1nodePools: - name: default initialNodeCount: 1Creating a cluster requires this file; operations on an existing cluster — read-only ones (list, info) and lifecycle ones (start, stop, delete) — work without it. Unknown fields are rejected, so the file stays in lockstep with the GKE API. Store it next to ksail.yaml, or point spec.cluster.distributionConfig at a custom path.
3. Set Credentials and Create the Cluster
Section titled “3. Set Credentials and Create the Cluster”gcloud auth application-default loginexport GOOGLE_CLOUD_PROJECT=my-projectexport GOOGLE_CLOUD_LOCATION=europe-north1
ksail cluster createSee the GCP provider guide for the full credential and environment-variable reference.
Lifecycle
Section titled “Lifecycle”| Command | Effect |
|---|---|
ksail cluster create |
Provisions the cluster from gke.yaml and waits for completion |
ksail cluster delete |
Deletes the cluster |
ksail cluster stop |
Scales all node pools to zero to halt node costs |
ksail cluster start |
Restores node pools to their configured size |
ksail cluster list |
Lists clusters (searches all locations when no location is set) |
ksail cluster info |
Shows cluster details |
Limitations
Section titled “Limitations”- Cloud distribution — local Docker containers (mirrors, registries) are inaccessible from the cluster
- Only one provider is supported: GCP
- The control plane keeps running (and billing) while node pools are stopped — use
ksail cluster deleteto stop all charges