helm3 部署ES集群

文章目录

      • 添加helm源
      • 自定义values.yaml文件
      • 安装es
      • 升级es

部署说明: k8s集群需要有默认storageclass可以动态创建pv

添加helm源

helm repo add elastic https://helm.elastic.co
helm  repo update

自定义values.yaml文件

clusterName: "es"
nodeGroup: "master"

replicas: 3
minimumMasterNodes: 1

roles:
  master: "true"
  ingest: "true"
  data: "true"
  remote_cluster_client: "false"

image: "docker.elastic.co/elasticsearch/elasticsearch"
imageTag: "7.7.1"

esJavaOpts: "-Xmx1g -Xms1g"

resources:
  requests:
    cpu: "1000m"
    memory: "2Gi"
  limits:
    cpu: "4000m"
    memory: "8Gi"

volumeClaimTemplate:
  resources:
    requests:
      storage: 100Gi

extraVolumeMounts:
  - name: bdh-master
    mountPath: /usr/share/elasticsearch/plugins
    subPath: plugins
    readOnly: false

esConfig:
  elasticsearch.yml: |
    xpack.security.enabled: false
    http.cors.enabled: true
    http.cors.allow-credentials: true
    http.cors.allow-origin: "/.*/"
    http.cors.allow-headers: WWW-Authenticate,X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization

service:
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
  type: LoadBalancer

安装es

kubectl create namespace es
helm install -f ./values.yaml es elastic/elasticsearch -n es --version 7.7.1

升级es

helm upgrade -f ./values.yaml es elastic/elasticsearch -n es

你可能感兴趣的:(Kubernetes,elasticsearch,搜索引擎,big,data)