下载 es 的插件,
elasticsearch-analysis-ik
medcl /elasticsearch-analysis-pinyin
1
2
3
https://objects.githubusercontent.com/github-production-release-asset-2e65be/2993595/7fda31a3-b910-4581-89e4-8eb26a11eb29?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230516T055012Z&X-Amz-Expires=300&X-Amz-Signature=33ddcdf88a6787f87b837ae479cd20cbe5466d0eb65b84e0e69b648913e3f9c3&X-Amz-SignedHeaders=host&actor_id=16282496&key_id=0&repo_id=2993595&response-content-disposition=attachment%3B%20filename%3Delasticsearch-analysis-ik-8.7.0.zip&response-content-type=application%2Foctet-stream
https://objects.githubusercontent.com/github-production-release-asset-2e65be/4405468/025f8898-4eed-474e-802e-18530f00d1d3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230516T082625Z&X-Amz-Expires=300&X-Amz-Signature=faf90d32dca8ccda3c7f758c7f463cbfbd590ede57b2468169c3c789185d27ff&X-Amz-SignedHeaders=host&actor_id=16282496&key_id=0&repo_id=4405468&response-content-disposition=attachment%3B%20filename%3Delasticsearch-analysis-pinyin-8.7.1.zip&response-content-type=application%2Foctet-stream
编写 Dockerfile
1
2
3
4
5
6
7
$cat Dockerfile<<EOF
FROM docker.io/bitnami/elasticsearch:8.7.1-debian-11-r5
COPY ik /opt/bitnami/elasticsearch/plugins/ik
COPY pinyin /opt/bitnami/elasticsearch/plugins/pinyin
EOF
$docker build -t 10.7.116.12:5000/base/es-ik:8.7.0 .
$docker push 10.7.116.12:5000/base/es-ik:8.7.0
Helm 开始安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$helm install \
helm install \
apphub/elasticsearch \
--name hj-es \
--set image.repository=base/elastic-hj \
--set image.tag=7.6.0 \
--set image.registry=registry.smokelee.com \
--set master.replicas=2 \
--set master.heapSize=256m \
--set coordinating.heapSize=256m \
--set data.persistence.storageClass=common-svc-nfs-storage-class \
--set data.persistence.size=20Gi \
--set data.heapSize=1024m \
--set plugins=analysis-icu \
--set sysctlImage.enabled=false
编译带 repository-s3 的镜像
1
2
3
FROM docker.elastic.co/elasticsearch/elasticsearch:7.12.1
ADD repository-s3-7.12.1.zip /tmp/repository-s3-7.12.1.zip
RUN elasticsearch-plugin install --batch file:///tmp/repository-s3-7.12.1.zip
注意 batch 必须加,否则报错 unable to read from standard input; is standard input open and a tty attached?。
Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC