After Installing X-pack security in elasticsearch 7.2 .My default password "changeme" not working

Hello,
I am using elastic search 7.2.0. I have installed xpack successfully from the below configurations. But I am unable to use my default password "changeme" .Or is there any way to set a default password in configmap.yml?
Here is my config file

apiVersion: v1
kind: ConfigMap
metadata:
  name: es-config
  namespace: kube-system
data:
  elasticsearch.yml: |
    cluster.name: my-elastic-cluster
    network.host: "0.0.0.0"
    path.repo: ["/usr/share/elasticsearch/data/"]
    xpack.security.enabled: true
    xpack.security.authc.accept_default_password: true

In case it helps, here is how I'm setting that with docker compose ( docker-compose.yml):

---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - ELASTIC_PASSWORD=$ELASTIC_PASSWORD
      - xpack.security.enabled=$ELASTIC_SECURITY
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
    environment:
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
    ports: ['5601:5601']
    networks: ['stack']
    links: ['elasticsearch']
    depends_on: ['elasticsearch']

networks:
  stack: {}

.env file is:

ELASTIC_VERSION=7.5.1
ELASTIC_SECURITY=true
ELASTIC_PASSWORD=changeme

You might have similar option in K8S (I did not check though).

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.