I installed Prometheus by
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack
Then installed Elasticsearch by
kubectl create -f https://download.elastic.co/downloads/eck/2.12.1/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.12.1/operator.yaml
cat <<EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: quickstart
spec:
version: 8.13.4
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
EOF
I tried to install prometheus elasticsearch operator by
helm install prometheus-elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
--set "es.uri=https://quickstart-es-http.default.svc:9200/"
helm upgrade prometheus-elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
--set "es.uri=https://quickstart-es-http.default.svc:9200/" \
--set "es.ca=./ca.pem" \
--set "es.client-cert=./client-cert.pem" \
--set "es.client-key=./client-key.pem"
helm upgrade prometheus-elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
--set "es.uri=https://quickstart-es-http.default.svc:9200/" \
--set "es.ssl-skip-verify=true"
The logs in prometheus-elasticsearch-operator pod always
level=info ts=2024-06-06T07:15:29.318305827Z caller=clusterinfo.go:214 msg="triggering initial cluster info call"
level=info ts=2024-06-06T07:15:29.318432285Z caller=clusterinfo.go:183 msg="providing consumers with updated cluster info label"
level=error ts=2024-06-06T07:15:29.33127516Z caller=clusterinfo.go:267 msg="failed to get cluster info" err="Get \"https://quickstart-es-http.default.svc:9200/\": tls: failed to verify certificate: x509: certificate signed by unknown authority"
level=error ts=2024-06-06T07:15:29.331307118Z caller=clusterinfo.go:188 msg="failed to retrieve cluster info from ES" err="Get \"https://quickstart-es-http.default.svc:9200/\": tls: failed to verify certificate: x509: certificate signed by unknown authority"
level=info ts=2024-06-06T07:15:39.320192915Z caller=main.go:249 msg="initial cluster info call timed out"
level=info ts=2024-06-06T07:15:39.321127165Z caller=tls_config.go:274 msg="Listening on" address=[::]:9108
level=info ts=2024-06-06T07:15:39.32119804Z caller=tls_config.go:277 msg="TLS is disabled." http2=false address=[::]:9108
How to set and config the Elasticsearch connection correctly?
Or may I disable SSL in ECK first, then create a cloud certificate such as ACM is a good practice?
https://github.com/prometheus-community/elasticsearch_exporter