Create Elastic Logging
In this section we will show how you can create your Elastic Logging component as part of your Kubernetes cluster, regardless of what cloud provider you have chosen.
If you also have Ambassador in your LiveSystem, Fractal Cloud will make Kibana available at the Ambassador host address.
Elastic Logging in AKS
AzureKubernetesService.builder()
.withId("aks-1")
.withDescription("AKS Cluster")
.withDisplayName("AKS #1")
.region(EUROPE_WEST)
.withNodePool(AzureNodePool.builder()
.withName("nodepool")
.withMachineType(STANDARD_B2S)
.build())
.withLogging(CaaSElasticLogging.builder()
.withId("elastic-logging")
.withVersion("2.5.0")
.withDescription("Elastic Logging")
.withDisplayName("Elastic Logging")
.withNamespace("elastic")
.withLink(getComponentLink())
.withKibana(true)
.withElasticVersion("8.5")
.withInstances(1)
.withStorage("10Gi")
.withStorageClassName("standard")
.withMemory(1)
.withCpu(1)
.build())
.build();
For more details you can check the code on GitHub in our samples repository for Elastic Logging in Azure or Elastic Logging with Ambassador in Azure.
Elastic Logging in GKE
GoogleKubernetesEngine.builder()
.withId("gke-1")
.withDescription("GKE Cluster")
.withDisplayName("GKE #1")
.region(EU_WEST1)
.withNodePool(GcpNodePool.builder()
.withName("nodepool")
.withMachineType(E2_STANDARD2)
.build())
.withLogging(CaaSElasticLogging.builder()
.withId("elastic-data")
.withVersion("2.5.0")
.withDescription("Elastic Logging")
.withDisplayName("Elastic Logging")
.withNamespace("elastic")
.withLink(getComponentLink())
.withKibana(true)
.withAPM(true)
.withElasticVersion("8.5")
.withInstances(1)
.withStorage("10Gi")
.withStorageClassName("standard")
.withMemory(1)
.withCpu(1)
.build())
.build();
For more details you can check the code on GitHub in our samples repository for Elastic Logging in GCP or Elastic Logging with Ambassador in GCP.
Elastic Logging Prerequisites
The ECK operator requires the below images, including the fluentd image.
- docker.elastic.co/eck/eck-operator:2.5.0
- docker.elastic.co/elasticsearch/elasticsearch:8.5.0
- docker.elastic.co/kibana/kibana:8.5.0
- docker.elastic.co/apm/apm-server:8.5.0
- fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
A script similar to the following might be of help:
containerRegistry="<your container registry prefix>"
docker pull docker.elastic.co/eck/eck-operator:2.5.0
docker tag docker.elastic.co/eck/eck-operator:2.5.0 ${containerRegistry}/eck/eck-operator:2.5.0
docker push ${containerRegistry}/eck/eck-operator:2.5.0
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.5.0
docker tag docker.elastic.co/elasticsearch/elasticsearch:8.5.0 ${containerRegistry}/elasticsearch/elasticsearch:8.5.0
docker push ${containerRegistry}/elasticsearch/elasticsearch:8.5.0
docker pull docker.elastic.co/kibana/kibana:8.5.0
docker tag docker.elastic.co/kibana/kibana:8.5.0 ${containerRegistry}/kibana/kibana:8.5.0
docker push ${containerRegistry}/kibana/kibana:8.5.0
docker pull docker.elastic.co/apm/apm-server:8.5.0
docker tag docker.elastic.co/apm/apm-server:8.5.0 ${containerRegistry}/apm/apm-server:8.5.0
docker push ${containerRegistry}/apm/apm-server:8.5.0
docker pull fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
docker tag fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch ${containerRegistry}/fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
docker push ${containerRegistry}/fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch