kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch14/lab
2024-02-20 17:15:27 +08:00
..
docs 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
monitoring 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
solution 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
elasticsearch.yml 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
README.md 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00

Ch14 lab

Setup

Deploy the monitoring subsystem:

kubectl apply -f lab/monitoring/

Browse to the Prometheus UI - there are no targets

Sample Solution

This is the background info:

My solution is in elasticsearch.yaml.

Create the namespace and deploy the app:

kubectl create ns kiamol-ch14-lab

kubectl apply -f lab/elasticsearch.yml -n kiamol-ch14-lab

Back in Prometheus you'll see the target added, with about 300 new metrics

elasticsearch_cluster_health_up is the most basic, it should return 1 and show the version info in the labels:

Prometheus metrics from the Elasticsearch exporter

Teardown

Remove the namespaces and that removes everything:

kubectl delete ns kiamol-ch14-lab

kubectl delete ns kiamol-ch14-lab-monitoring