Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
This repository was archived by the owner on May 16, 2023. It is now read-only.

Randomly receive list of indices with kubectl exec on single node installation. #1787

@sergey989

Description

@sergey989

Chart version:
elasticsearch-7.17.3
Kubernetes version:
1.24.0
Kubernetes provider: E.g. GKE (Google Kubernetes Engine)
Azure
Helm Version:
Version:"v3.11.1"

helm get release output

Output of helm get release
USER-SUPPLIED VALUES:
clusterName: elastic-cluster
envFrom:
- secretRef:
    name: some-secret
esConfig:
  elasticsearch.yml: |
    action.destructive_requires_name: false
    discovery.type: single-node
    xpack.security.enabled: true
extraEnvs:
- name: cluster.initial_master_nodes
  value: null
minimumMasterNodes: 1
replicas: 1
resources:
  limits:
    cpu: "3.5"
    memory: 2.5Gi
  requests:
    cpu: 500m
    memory: 1Gi
sysctlInitContainer:
  enabled: false
volumeClaimTemplate:
  resources:
    requests:
      storage: 50Gi

Describe the bug:
HI team,
I have single node installation and try to receive a list of indices with pretty common command, but it shows randomly all indices or only hidden like green open .geoip_databases MzFJA4X-Q0a9eElUh1urgQ 1 0 42 0 40.6mb 40.6mb
and in the same time it works normal from any pod in kubernetes with command like

kubectl -n any_namespace exec any_pod_with_curl -- sh -c "curl -s --location --request GET --header  'Authorization: Basic base64_pass' 'http://elastic-master.elastic_ns.svc.cluster.local:9200/_cat/indices'"

If i use postman with port-forward tunnel, i always receive all indices .
There are no any sidecars, injections.
The only difference which i could find is my indices are yellow and .geoip is green

Steps to reproduce:

kubectl -n elastic_ns exec elastic-master-0 -- sh -c "/usr/bin/curl -s -v --location -XGET -H  'Authorization: Basic base64_pass' 'http://127.0.0.1:9200/_cat/indices'"

Expected behavior:
Full list of indices
Provide logs and/or server output (if relevant):

Be careful to obfuscate every secrets (credentials, token, public IP, ...) that could be visible in the output before copy-pasting

Here is the total amount of indices in output

kubectl -n elastic_ns exec elastic-master-0 -- sh -c "/usr/bin/curl -s -v --location -XGET -H  'Authorization: Basic base64_pass' 'http://127.0.0.1:9200/_cat/indices'" | wc -l
*   Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0)
> GET /_cat/indices HTTP/1.1
> Host: 127.0.0.1:9200
> User-Agent: curl/7.68.0
> Accept: */*
> Authorization: Basic base64_pass
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-elastic-product: Elasticsearch
< content-type: text/plain; charset=UTF-8
< content-length: 41700
<
{ [41700 bytes data]
* Connection #0 to host 127.0.0.1 left intact
300


jump_host:~$ kubectl -n elastic_ns exec elastic-master-0 -- sh -c "/usr/bin/curl -s -v --location -XGET -H  'Authorization: Basic base64_pass' 'http://127.0.0.1:9200/_cat/indices'" | wc -l
*   Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0)
> GET /_cat/indices HTTP/1.1
> Host: 127.0.0.1:9200
> User-Agent: curl/7.68.0
> Accept: */*
> Authorization: Basic base64_pass
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-elastic-product: Elasticsearch
< content-type: text/plain; charset=UTF-8
< content-length: 74
<
`**`{ [74 bytes data]`**`
* Connection #0 to host 127.0.0.1 left intact
1

jump_host:~$ kubectl -n elastic_ns exec elastic-master-0 -- sh -c "/usr/bin/curl -s -v --location -XGET -H  'Authorization: Basic base64_pass' 'http://127.0.0.1:9200/_cat/indices'" | wc -l
*   Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0)
> GET /_cat/indices HTTP/1.1
> Host: 127.0.0.1:9200
> User-Agent: curl/7.68.0
> Accept: */*
> Authorization: Basic base64_pass
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-elastic-product: Elasticsearch
< content-type: text/plain; charset=UTF-8
< content-length: 75
<
{ [75 bytes data]
* Connection #0 to host 127.0.0.1 left intact
1

Any additional context:
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions