Now I have to manually generate and mount the log configuration file to start it normally. However, due to security requirements, we now use ordinary users to maintain the es service. if the configuration file is mounted, the final configuration file will be the root user's permissions instead of the default ordinary user's permissions. This conflicts with the ordinary user maintenance we need.
[root@localhost ~]# ll /data/guodi/installmiddleware/data/elastic/config/
total 4
-rw-rw---- 1 guodi guodi 238 Jun 4 12:26 elasticsearch.keystore
-rwxr-xr-x 1 root root 0 Jun 4 12:33 elasticsearch.yml
-rwxr-xr-x 1 root root 0 Jun 4 12:33 jvm.options
-rwxr-xr-x 1 root root 0 Jun 4 12:29 log4j2.properties
[guodi@localhost installmiddleware]$ docker-compose ps -a
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
elastic elasticsearch:8.18.0 "/bin/tini -- /usr/l…" elastic About a minute ago Up About a minute (healthy) 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp
Not sure if this will help since I have only run Kibana in a container, but I have this as part of my values.yaml file:
podSecurityContext:
fsGroup: 996 # When Kibana is installed from an RPM package the Kibana group is 996.
runAsNonRoot: true
runAsUser: 998 # When Kibana is installed from an RPM package the Kibana user is 998
runAsGroup: 996 # When Kibana is installed from an RPM package the Kibana group is 996.
seccompProfile:
type: "RuntimeDefault"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
Maybe you can check if what user and group your Elasticsearch is run as, and see if you need something similar for your Helm chart?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.