hi team,
i brought an elastic stack on my kubernetes cluster using the guide
elasticsearch on kubernetes
but iam not able access the curl command using this
curl --cacert ca.crt -u elastic:password https://localhost:9200
but without using the certificate iam getting the expected result
also i have generated a new ca using
/usr/share/elasticsearch/bin/elasticsearch-certutil ca --pem
now i get a zip file after unzipping i get ca/ca.crt ca/ca.key ca/ca.p12
/usr/share/elasticsearch/bin/elasticsearch-certutil cert --silent --in /etc/elasticsearch/certs/instances.yml --ca-cert /usr/share/elasticsearch/ca/ca.crt --ca-key /usr/share/elasticsearch/ca/ca.key
now i go a zip file which contains node1.p12
this is my instance.yml
instances:
- name: "node1"
ip:
- "135.249.153.2"
- "127.0.0.1"
- "10.233.120.68"
dns:
- "localhost"
this is my elasticsearch.yml file
cluster:
name: quickstart
routing:
allocation:
awareness:
attributes: k8s_node_name
discovery:
seed_hosts: []
seed_providers: file
http:
publish_host: ${POD_NAME}.${HEADLESS_SERVICE_NAME}.${NAMESPACE}.svc
network:
host: "0"
publish_host: ${POD_IP}
node:
attr:
k8s_node_name: ${NODE_NAME}
name: ${POD_NAME}
store:
allow_mmap: false
path:
data: /usr/share/elasticsearch/data
logs: /usr/share/elasticsearch/logs
xpack:
license:
upload:
types:
- trial
- enterprise
security:
authc:
realms:
file:
file1:
order: -100
native:
native1:
order: -99
reserved_realm:
enabled: "false"
enabled: "true"
http:
ssl:
certificate: /usr/share/elasticsearch/config/http-certs/ca.crt
certificate_authorities: /usr/share/elasticsearch/config/http-certs/ca.crt
enabled: true
key: /usr/share/elasticsearch/config/http-certs/ca.key
transport:
ssl:
certificate: /usr/share/elasticsearch/config/node-transport-cert/transport.tls.crt
certificate_authorities:
- /usr/share/elasticsearch/config/transport-certs/ca.crt
- /usr/share/elasticsearch/config/transport-remote-certs/ca.crt
enabled: "true"
key: /usr/share/elasticsearch/config/node-transport-cert/transport.tls.key
verification_mode: certificate
can anyone please help?