Skip to content

Latest commit

 

History

History

elk

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

ELK Setup

Deploy ELK

❯ plz run //components/elk:deploy [minikube|baremetal]
  • Creates elastic-system namespace
  • Deploys the Elastic Operator
  • Deploys an Elasticsearch cluster
  • Deploys a Kibana instance

Verify pods are healthy:

❯ kubectl -n elastic-system get pods
NAME                         READY   STATUS    RESTARTS   AGE
elastic-operator-0           1/1     Running   1          106m
elasticsearch-es-default-0   0/1     Running   1          105m
kibana-kb-84645887d8-9fcsf   0/1     Running   1          105m

📝 NOTE FOR BAREMETAL: before deploying, make sure to prepare the data folder on the host (and to remove the same folder to reset the installation):

❯ sudo mkdir -p /etc/plz-k8s-lab/elastic/data/
❯ sudo chmod -R a+rw /etc/plz-k8s-lab/elastic/

Access Elasticsearch and Kibana

Via Port-Forward

❯ plz run //components/elk:ui

  • Forwards the Elasticsearch Service:
    • From inside the Kubernetes cluster: curl -u '${ELASTIC_USER}:${ELASTIC_PASSWORD}' -k 'http://elasticsearch-es-http:9200'
    • From your local workstation: curl -u '${ELASTIC_USER}:${ELASTIC_PASSWORD}' -k 'http://localhost:9200'
❯ curl -u 'elastic:<redacted>' -k 'http://localhost:9200'
{
  "name" : "elasticsearch-es-default-0",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "WLFbN05xRKqYYA0H6RN_mg",
  "version" : {
    "number" : "7.8.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
    "build_date" : "2020-06-14T19:35:50.234439Z",
    "build_snapshot" : false,
    "lucene_version" : "8.5.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Via Ingress on Baremetal

  • Verify the Ingresses have been deployed:
❯ kubectl -n elastic-system get ingress
NAME             CLASS    HOSTS                         ADDRESS   PORTS   AGE
kibana-ingress   <none>   kibana.192.168.1.151.nip.io             80      8m29s

📝 NOTE: before deploying, make sure to replace the host IP address in: //components/elk/deployment/overlays/baremetal/kibana-ui-ingress.yaml

This assumes you followed the setup described at "Kubernetes Lab on Baremetal".

References