Elastic Datastore in GKE
This page shows how to create an Elastic Datastore component as part of a Google Kubernetes Engine (GKE) cluster.
For prerequisites and image push instructions, see the main guide.
Java SDK
GoogleKubernetesEngine.builder()
.withId("gke-1")
.withDescription("GKE Cluster")
.withDisplayName("GKE #1")
.region(EU_WEST1)
.withNodePool(GcpNodePool.builder()
.withName("nodepool")
.withMachineType(E2_STANDARD2)
.build())
.withDocumentDB(CaaSElasticDataStore.builder()
.withId("elastic-data")
.withVersion("2.5.0")
.withDescription("Elastic Data Store")
.withDisplayName("Elastic Data Store")
.withNamespace("elastic-data")
.withLink(getComponentLink())
.withKibana(true)
.withElasticVersion("8.5")
.withInstances(1)
.withStorage("10Gi")
.withStorageClassName("standard")
.withMemory(1)
.withCpu(1)
.build())
.build();
For more details, see the Elastic Datastore in GCP sample on GitHub.