Skip to main content

Prometheus with Ambassador in GKE

This page shows how to create a Prometheus monitoring environment as part of a Google Kubernetes Engine (GKE) cluster.

For prerequisites, see the main guide.

Java SDK

GoogleKubernetesEngine.builder()
.withId("gke-1")
.withDescription("Test GKE cluster")
.withRegion(EU_WEST1)
.withNodePool(GcpNodePool.builder()
.withName("nodepool")
.withMachineType(E2_STANDARD2)
.build())
.withAPIGateway(CaaSAmbassador.builder()
.withId("ambassador")
.withHost("api.yourdomain.com")
.withHostOwnerEmail("email@yourdomain.com")
.withAcmeProviderAuthority("https://acme-v02.api.letsencrypt.org/directory")
.withTlsSecretName("env-tls-cert")
.build())
.withMonitoring(CaaSPrometheus.builder()
.withId("prometheus")
.withNamespace("monitoring")
.withApiGatewayUrl("api.yourdomain.com")
.build())
.build();

For more details, see the Prometheus with Ambassador in GKE sample on GitHub.

Pushing prerequisite images

If the required images are missing in your container registry, pull, tag, and push them to your GCP Artifact Registry or Container Registry following your organization's standard process.