Setup

A guide to setup elasticsearch on Kubernetes cluster using "Logging Operator".

Elasticsearch, Fluentd, and Kibana setup can be done by kubectl and helm. The API for information for elasticsearch is:-

Elasticsearch

Elasticsearch API information:-

---
apiVersion: logging.opstreelabs.in/v1alpha1
kind: Elasticsearch

Kubectl

For deployment using kubectl, we can use config/samples/elasticsearch.yaml file.

kubectl apply -f config/samples/elasticsearch-example.yaml

Elasticsearch configurated can be updated in the same file.

Helm

Helm can also be used to setup elasticsearch. Get into the directory helm-charts/logging-setup.

helm upgrade elastic-stack ./ -f values.yaml \
    --set elasticsearch.enabled=true \
    --set elasticsearch.master.enabled=true \
    --set elasticsearch.master.replicas=3 \
    --set elasticsearch.data.enabled=true \
    --set elasticsearch.data.replicas=3 \
    --set elasticsearch.client.enabled=true \
    --set elasticsearch.client.replicas=1 \
    --set elasticsearch.ingestion.enabled=true \
    --set elasticsearch.ingestion.replicas=1 \
    --namespace logging-operator --install

Validate the elasticsearch cluster.

Fluentd

Fluentd API information:-

---
apiVersion: logging.opstreelabs.in/v1alpha1
kind: Fluentd

Kubectl

For deployment using kubectl, we can use config/samples/fluentd.yaml file.

kubectl apply -f config/samples/fluentd-example.yaml

Fluentd configurated can be updated in the same file.

Helm

Helm can also be used to setup fluentd. Get into the directory helm-charts/logging-setup.

helm upgrade fluentd-stack ./ \
    -f values.yaml --set fluentd.enabled=true \
    --namesapce logging-operator --install

Validate fluentd status

Kibana

Kibana API information:-

---
apiVersion: logging.opstreelabs.in/v1alpha1
kind: Kibana

Kubectl

For deployment using kubectl, we can use config/samples/kibana.yaml file.

kubectl apply -f config/samples/kibana-example.yaml

Kibana configuration can be updated in the same file.

Helm

Helm can also be used to setup kibana. Get into the directory helm-charts/logging-setup.

helm upgrade kibana-stack ./ \
    -f values.yaml --set kibana.enabled=true \
    --namespace logging-operator --install

Last updated