# Talk to OpenSearch's REST API from your laptop, through kubectl. # Load it into your shell with: . scripts/os.sh # then, for example: os "$URL/_cluster/health?pretty" # # The request runs inside the OpenSearch pod and authenticates with the admin # client certificate from cert-manager, so no password is typed or stored. os() { kubectl -n logging exec -i opensearch-cluster-master-0 -c opensearch -- \ curl -s --cacert config/certs/ca.crt \ --cert config/admin-certs/tls.crt --key config/admin-certs/tls.key \ -H 'Content-Type: application/json' "$@" } URL=https://opensearch-cluster-master.logging.svc:9200