Following CURL commands can be executed on the Kubernetes control nodes where etcd pods are running to check the health status of etcd and get metrics.
CURL command to check healthstatus of etcd
curl --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key --cacert /etc/kubernetes/pki/etcd/ca.crt -L https://127.0.0.1:2379/health
Below is sample output which shows etcd health status as healthy.
{"health":"true","reason":""}
CURL command to check metrics of etcd
curl --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key --cacert /etc/kubernetes/pki/etcd/ca.crt -L https://127.0.0.1:2379/metrics
Below is partial snippet of sample output.
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
Keywords
etcd etcdctl curl command commands validate check checking validating state status up and running endpoint end point
No comments:
Post a Comment