All GKE code samples
This page contains code samples for Google Kubernetes Engine. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Pub/Sub HPA
Kubernetes Horizontal Pod Autoscaler for Pub/Sub sample app.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- YAML
Custom metrics prometheus exporter source code
Source code for custom prometheus exporter to Cloud Monitoring.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- Go
Hello app deployment
Kubernetes deployment for GKE Hello app.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- YAML
Client library quickstart
Use the Node.js GKE cluster admin client library.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- Node JS
- JavaScript
Custom metrics exporter deployment
Kubernetes deployment manifest for a custom Cloud Monitoring exporter.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Hello app source code
Source code for GKE Hello app server.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- Go
Custom metrics prometheus exporter deployment
Kubernetes deployment for prometheus exporter.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- YAML
Hello app ingress
Kubernetes ingress resource for GKE Hello app.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Hello app HPA
Kubernetes Horizontal Pod Autoscaler for GKE Hello app.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Custom metrics exporter HPA
Horizontal Pod Autoscaler for custom Cloud Monitoring exporter.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Pub/Sub deployment with credentials
Kubernetes deployment for the Pub/Sub sample app, with GOOGLE_APPLICATION_CREDENTIALS added as an environment variable.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- YAML
Pull Pub/Sub messages from subscription
Continuously pull messages from an existing Pub/Sub subscription.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- Python
Hello app service
Kubernetes service for GKE Hello app.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Custom metrics prometheus exporter HPA
Horizontal Pod Autoscaler for prometheus exporter to Cloud Monitoring.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Custom metrics exporter source code
Source code for custom Cloud Monitoring exporter.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- Go
Hello app redistribution deployment
Kubernetes deployment for GKE Hello app redistibution.
- Google Cloud
- Google Kubernetes Engine (GKE)
- Kubernetes Engine API
- YAML
Pub/Sub deployment
Kubernetes deployment for Pub/Sub sample application.
- Google Kubernetes Engine (GKE)
- Google Cloud
- Kubernetes Engine API
- YAML