Elasticsearch(35)
-
Elasticsearch api key 만들기
Dev ToolsPOST /_security/api_key{ "name": "ai", # key 이름 "expiration": "90d", # 만료일 지정, 만료일이 없으면 무제한 "role_descriptors": { "ai_role": { # 별의미 없음(아무거나 적절히 지정) "indices": [ { "names": ["abc-*"], "privileges": ["read", "view_index_metadata"] # 대상 index 조회 권한만 필요한 경우 } ] } }}# 조회GET /_security/api_key?name=ai&owner=true# 만료일 갱신# 만료일을 무제한으로 바꾸는 건..
2025.08.28 -
Elasticsearch index 내용 검색
설정# ES 서비스로 포워드kubectl -n elastic port-forward svc/es-es-http 9200:9200# http/https 체크 (ES에서 http.ssl.disabled=true 주셨다면 http로)curl -s http://localhost:9200/_cluster/health?pretty검색# 계정으로 접속# 최근에 입력된 데이터 1건 조회curl -u "{id:pw}" -X POST "http://localhost:9200/plant-topic-2025.08/_search" \ -H "Authorization: ApiKey ZWN5TDdwZ0Jjcm5oZkZYQUNJcU06dGhxb3ZYTzFTcHU3cTRHb2pUQVB3Zw==" \ -H 'Content-Type:..
2025.08.28 -
elasticsearch 특정 index의 특정 row 석제
DELETE {index명}/_doc/{row id}?refresh=wait_for
2025.08.24 -
ES HTTPS 전환
방법1kubectl -n elastic patch elasticsearch es --type=merge \ -p '{"spec":{"http":{"tls":{"selfSignedCertificate":{"disabled":false}}}}}'방법2spec: # http 블록을 삭제하거나, http: tls: selfSignedCertificate: disabled: false nodeSets: - name: hot-ssd config: node.store.allow_mmap: false xpack.security.enabled: true # xpack.security.http.ssl.* 롤아웃 확인kubectl -n ..
2025.08.13 -
Elasticsearch가 정상인지 확인
포트 확인# ES 서비스로 포워드kubectl -n elastic port-forward svc/es-es-http 9200:9200# http/https 체크 (ES에서 http.ssl.disabled=true 주셨다면 http로)curl -s http://localhost:9200/_cluster/health?pretty Kibana ↔ ES 연결(Association) 확인 kubectl -n elastic get kibana kib -o yaml | sed -n '1,200p' | grep -A3 elasticsearchRefkubectl -n elastic get secret | grep kib-kb # 연동용 시크릿들이 생성되어 있어야 정상# 인증 오류있으면, 삭제/재생성kubectl -n..
2025.08.13 -
포트 확인
kubectl -n elastic port-forward svc/kib-kb-http 5601:5601# 브라우저에서 http://localhost:5601
2025.08.13