ELK to monitor Kubernetes
You can run filebeat to collect logs from kubernetes.Follow the instruction of documentation on link:
After you download kubernetes.yaml change:
- name: ELASTICSEARCH_HOST value: [your elastic search domain]- name: ELASTICSEARCH_PORT value: "9200"- name: ELASTICSEARCH_USERNAME value: elastic- name: ELASTICSEARCH_PASSWORD value: changeme
Pay attention! You need admin privileges for creating filebeat ServiceAccount
We can use EFK stack for Kubernetes Logging and Monitoring. We need a Kubernetes cluster with following capabilities.
- Ability to run privileged containers.
- Helm and tiller enabled.
- Statefulsets and dynamic volume provisioning capability: Elasticsearch is deployed as stateful set on Kubernetes. It’s best to use latest version of Kubernetes (v 1.10 as of this writing)
Please refer https://platform9.com/blog/kubernetes-logging-and-monitoring-the-elasticsearch-fluentd-and-kibana-efk-stack-part-2-elasticsearch-configuration/ for step by step guide.