# Elastic search authentication issue with helm

**URL:** <https://discuss.elastic.co/t/elastic-search-authentication-issue-with-helm/347331>\
**Category:** Elasticsearch\
**Created:** [November 16, 2023, 12:54pm UTC](https://discuss.elastic.co/t/elastic-search-authentication-issue-with-helm/347331 "2023-11-16T12:54:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mithun\_Walawalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mithun_walawalkar/32/127650_2.png) [@Mithun\_Walawalkar](https://discuss.elastic.co/u/Mithun_Walawalkar)\
**Post date:** [November 16, 2023, 12:54pm UTC](https://discuss.elastic.co/t/elastic-search-authentication-issue-with-helm/347331/1 "2023-11-16T12:54:06Z")

</div>

Hi,

I am using Helm to install Elastic. I am able to successfully install it but when I try to log into Elastic with a predefined username and password it returns 401. It is very strange that it fails even if I use the default master credential.

When I try to log in:

 ![log-in-elk](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fdd360d6478fb7059b5c949ce35070df5786a3e3.jpeg)

Where does Elasticsearch create the user? Inside /bin folder? I see No users message inside the user.

elasticsearch@elasticsearch-master-0:~/bin$ elasticsearch-users list  
No users found

Here is my elastic.yaml file used with helm

```auto
</>
---
clusterName: "elasticsearch"
nodeGroup: "master"

node.roles:
  master: "true"
  ingest: "true"
  data: "true"
  remote_cluster_client: "true"
  ml: "true"

replicas: 1
minimumMasterNodes: 1

protocol: https
httpPort: 9200
image: "konguatacr001.azurecr.io/elastic"
imageTag: "1.0.o"
imagePullPolicy: "IfNotPresent"
imagePullSecrets:
  - name: acr-secret

extraEnvs:
  - name: "ELASTIC_PASSWORD"
    valueFrom:
      secretKeyRef:
        name: "elastic-credentials"
        key: "password"
  - name: "ELASTIC_USERNAME"
    valueFrom:
      secretKeyRef:
        name: "elastic-credentials"
        key: "username"

esConfig:
  elasticsearch.yml: |
    xpack.security.enabled: "true"
    xpack.security.transport.ssl.enabled: "true"
    xpack.security.transport.ssl.supported_protocols: "TLSv1.2"
    xpack.security.transport.ssl.client_authentication: "none"
    xpack.security.transport.ssl.key: "/usr/share/elasticsearch/config/certs/tls.key"
    xpack.security.transport.ssl.certificate: "/usr/share/elasticsearch/config/certs/tls.crt"
    xpack.security.transport.ssl.certificate_authorities: "/usr/share/elasticsearch/config/certs/homelab-ca.crt"
    xpack.security.transport.ssl.verification_mode: "certificate"
    xpack.security.http.ssl.enabled: "true"
    xpack.security.http.ssl.supported_protocols: "TLSv1.2"
    xpack.security.http.ssl.client_authentication: "none"
    xpack.security.http.ssl.key: "/usr/share/elasticsearch/config/certs/tls.key"
    xpack.security.http.ssl.certificate: "/usr/share/elasticsearch/config/certs/tls.crt"
    xpack.security.http.ssl.certificate_authorities: "/usr/share/elasticsearch/config/certs/homelab-ca.crt"

secretMounts:
  - name: "elastic-certificates"
    secretName: "elastic-certificates"
    path: "/usr/share/elasticsearch/config/cert"
    defaultMode: "0755"

resources:
  requests:
    cpu: "250m"
    memory: "2Gi"
  limits:
    cpu: "1000m"
    memory: "2Gi"

volumeClaimTemplate:
  accessModes: ["ReadWriteOnce"]
  storageClassName: "default"
  resources:
    requests:
      storage: 4Gi

service:
  enabled: true
  labels: {}
  labelsHeadless: {}
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
  httpPortName: https
  transportPortName: transport
  loadBalancerSourceRanges: []
  externalTrafficPolicy: ""

clusterHealthCheckParams: "wait_for_status=yellow&timeout=2s"

```

Any help is really appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 14, 2023, 12:54pm UTC](https://discuss.elastic.co/t/elastic-search-authentication-issue-with-helm/347331/2 "2023-12-14T12:54:24Z")

</div>

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