I have Kubernetes cluster runnning and created the ELK stack on different machine. Now I want to ship the logs from Kubernetes cluster to ELK how can I achieve it? The ELK stack is outside the cluster.
We can use EFK stack for Kubernetes Logging and Monitoring. We need a Kubernetes cluster with following capabilities.
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.
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