在Openshift错误chroot上运行ElasticSearch7.17:无法将根目录更改为"/":不允许操作

8xiog9wr  于 2023-01-20  发布在  ElasticSearch
关注(0)|答案(1)|浏览(213)

当在Openshift中启动集群Elasticsearch 7.17时,集群会写入一个错误chroot:无法将根目录更改为"/":不允许操作'Kibana启动正常。
代码:'api版本:应用程序/v1种类:状态集元数据:名称:ElasticSearch名称空间:ElasticSearch-PP规范:服务名称:ElasticSearch复制副本:3
选择器:匹配标签:应用程序:ElasticSearch模板:元数据:标签:应用程序:ElasticSearch规格:容器:- 名称:ElasticSearch

image: NEXUS/elasticsearch:7.17.7
    env:
      - name: cluster.name
        value: k8s-logs
      - name: node.name
        valueFrom:
          fieldRef:
            fieldPath: metadata.name
      - name: discovery.seed_hosts
        value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
      - name: cluster.initial_master_nodes
        value: "es-cluster-0,es-cluster-1,es-cluster-2"
      - name: ES_JAVA_OPTS
        value: "-Xms4012m -Xmx4012m"
    ports:
    - containerPort: 9200
      name: client
    - containerPort: 9300
      name: nodes
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data
 
  initContainers:
  - name: fix-permissions
    image: NEXUS/busybox
    command: ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data

  - name: increase-vm-max-map
    image: NEXUS/busybox
    imagePullPolicy: IfNotPresent
    command: ["/bin/sh"]
    args: ["-c", "sysctl -w vm.max_map_count=262144; echo vm.max_map_count=262144 >> /etc/sysctl.conf ; sysctl -p"]
    
  #   image: NEXUS/busybox
  #   command: ["sysctl", "-w", "vm.max_map_count=262144"]
    
  - name: increase-fd-ulimit
    image: NEXUS/busybox
    command: ["sh", "-c", "ulimit -n 65536"]
    

  serviceAccount: elk-anyuid
  serviceAccountName: elk-anyuid
  restartPolicy: Always
  volumes:
  - name: data-cephfs
    persistentVolumeClaim:
      claimName: data-cephfs          `

我尝试更改群集设置,禁用initContainers,但错误仍然存在

xn1cxnb4

xn1cxnb41#

查看价格图表查看价格数值.yaml
helm模板. -f值.yaml〉应用程序.yaml
https://github.com/elastic/helm-charts

相关问题