Opensearch data nodes do not connect to the masters when deploying in kind clusters

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch version:
echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
opensearch-client echinsi 1 2024-10-21 15:45:22.756349284 +0200 CEST deployed opensearch-2.26.0 2.17.1
opensearch-data echinsi 8 2024-10-21 15:38:22.66489551 +0200 CEST deployed opensearch-2.26.0 2.17.1
opensearch-master echinsi 8 2024-10-21 15:29:54.385462103 +0200 CEST deployed opensearch-2.26.0 2.17.1

Describe the issue:

Configuration:

Relevant Logs or Screenshots:
I have a local KinD cluster in which i am trying to deploy opensearch version as mentioned above and my deployment seems to go through where i see my pods are running like below:
k get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-7c5ddbdf54-cn7nw 1/1 Running 0 5h6m 10.244.2.8 kind-worker
opensearch-cluster-client-0 1/1 Running 0 63m 10.244.1.14 kind-worker2
opensearch-cluster-data-0 1/1 Running 0 4m13s 10.244.1.16 kind-worker2
opensearch-cluster-data-1 1/1 Running 0 70m 10.244.2.51 kind-worker
opensearch-cluster-master-0 1/1 Running 0 6m34s 10.244.2.52 kind-worker

k get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx LoadBalancer 10.96.179.203 100.109.1.10 80:30365/TCP 5h7m
opensearch-cluster-client ClusterIP 10.96.148.139 9200/TCP,9300/TCP,9600/TCP 64m
opensearch-cluster-client-headless ClusterIP None 9200/TCP,9300/TCP,9600/TCP 64m
opensearch-cluster-data ClusterIP 10.96.52.55 9200/TCP,9300/TCP,9600/TCP 111m
opensearch-cluster-data-headless ClusterIP None 9200/TCP,9300/TCP,9600/TCP 111m
opensearch-cluster-master ClusterIP 10.96.221.154 9200/TCP,9300/TCP,9600/TCP 147m
opensearch-cluster-master-headless ClusterIP None 9200/TCP,9300/TCP,9600/TCP 147m

when i check the logs in the data nodes it seems that they are not able to connect to the masters

[2024-10-21T15:01:02,062][WARN ][o.o.c.c.ClusterFormationFailureHelper] [opensearch-cluster-data-1] cluster-manager not discovered yet: have discovered [{opensearch-cluster-data-1}{ZRRYldUERIGfXiXNiX_54g}{sqaLrkkNRnSI5NyZH8clwA}{localhost}{127.0.0.1:9300}{d}{shard_indexing_pressure_enabled=true}]; discovery will continue using [10.244.2.52:9300] from hosts providers and from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2024-10-21T15:01:03,053][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:04,053][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:05,053][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:06,053][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:07,053][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:08,054][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:09,054][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:10,054][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:11,054][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:12,054][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-cluster-data-1] Wait for cluster to be available …
[2024-10-21T15:01:12,063][WARN ][o.o.c.c.ClusterFormationFailureHelper] [opensearch-cluster-data-1] cluster-manager not discovered yet: have discovered [{opensearch-cluster-data-1}{ZRRYldUERIGfXiXNiX_54g}{sqaLrkkNRnSI5NyZH8clwA}{localhost}{127.0.0.1:9300}{d}{shard_indexing_pressure_enabled=true}]; discovery will continue using [10.244.2.52:9300] from hosts providers and from last-known cluster state; node term 0, last-accepted version 0 in term 0

sample value files can be provided

I am not sure how to attach the charts that i am using in this thread.

I also found this error in both master and data nodes:
[2024-10-21T14:45:00,320][ERROR][o.o.s.l.BuiltinLogTypeLoader] [opensearch-cluster-data-0] Failed loading builtin log types from disk!
java.nio.file.FileSystemNotFoundException: null
at jdk.zipfs@21.0.4/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156) ~[?:?]
at jdk.zipfs@21.0.4/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142) ~[?:?]
at java.base/java.nio.file.Path.of(Path.java:209) ~[?:?]
at java.base/java.nio.file.Paths.get(Paths.java:98) ~[?:?]
at org.opensearch.securityanalytics.logtype.BuiltinLogTypeLoader.loadBuiltinLogTypes(BuiltinLogTypeLoader.java:73) ~[opensearch-security-analytics-2.17.1.0.jar:2.17.1.0]
at org.opensearch.securityanalytics.logtype.BuiltinLogTypeLoader.ensureLogTypesLoaded(BuiltinLogTypeLoader.java:62) [opensearch-security-analytics-2.17.1.0.jar:2.17.1.0]
at org.opensearch.securityanalytics.logtype.BuiltinLogTypeLoader.doStart(BuiltinLogTypeLoader.java:146) [opensearch-security-analytics-2.17.1.0.jar:2.17.1.0]
at org.opensearch.common.lifecycle.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:77) [opensearch-common-2.17.1.jar:2.17.1]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) [?:?]
at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116) [?:?]
at org.opensearch.node.Node.start(Node.java:1564) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.Bootstrap.start(Bootstrap.java:339) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:413) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:181) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:172) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) [opensearch-cli-2.17.1.jar:2.17.1]
at org.opensearch.cli.Command.main(Command.java:101) [opensearch-cli-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:138) [opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:104) [opensearch-2.17.1.jar:2.17.1]

I have tried to follow the thread and used the values as mentioned in the last message but still i have the same issue.

@chinmoy Your main problem is with forming the cluster.

cluster-manager not discovered yet: have discovered 

Please share your values.yml file. Are you using official OpenSearch charts?

hi @pablo
I used this link from opensearch Setup OpenSearch multi-node cluster on Kubernetes using Helm Charts · OpenSearch

Master:
echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch$ cat master.yaml

---
clusterName: "opensearch-cluster"
nodeGroup: "master"

# The service that non master groups will try to connect to when joining the cluster
# This should be set to clusterName + "-" + nodeGroup for your master group
masterService: "opensearch-cluster-master"

# OpenSearch roles that will be applied to this nodeGroup
# These will be set as environment variable "node.roles". E.g. node.roles=master,ingest,data,remote_cluster_client

roles:
  - master
  - ingest: false
  - data: false
  - remote_cluster_client: false

replicas: 1

# if not set, falls back to parsing .Values.imageTag, then .Chart.appVersion.
majorVersion: ""

global:
  # Set if you want to change the default docker registry, e.g. a private one.
  dockerRegistry: ""

# Allows you to add any config files in {{ .Values.opensearchHome }}/config
opensearchHome: /usr/share/opensearch
# such as opensearch.yml and log4j2.properties
config:
  # Values must be YAML literal style scalar / YAML multiline string.
  # <filename>: |
  #   <formatted-value(s)>
  # log4j2.properties: |
  #   status = error
  #
  #   appender.console.type = Console
  #   appender.console.name = console
  #   appender.console.layout.type = PatternLayout
  #   appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
  #
  #   rootLogger.level = info
  #   rootLogger.appenderRef.console.ref = console
  opensearch.yml: |
    cluster.name: opensearch-cluster

    # Bind to all interfaces because we don't know what IP address Docker will assign to us.
    network.bind_host: 0.0.0.0
    transport.host: localhost
    transport.tcp.port: 9300

    # Setting network.host to a non-loopback address enables the annoying bootstrap checks. "Single-node" mode disables them again.
    # discovery.type: single-node

    # Start OpenSearch Security Demo Configuration
    # WARNING: revise all the lines below before you go into production
    plugins:
      security:
        ssl:
          transport:
            pemcert_filepath: esnode.pem
            pemkey_filepath: esnode-key.pem
            pemtrustedcas_filepath: root-ca.pem
            enforce_hostname_verification: false
          http:
            enabled: true
            pemcert_filepath: esnode.pem
            pemkey_filepath: esnode-key.pem
            pemtrustedcas_filepath: root-ca.pem
        allow_unsafe_democertificates: true
        allow_default_init_securityindex: true
        authcz:
          admin_dn:
            - CN=kirk,OU=client,O=client,L=test,C=de
        audit.type: internal_opensearch
        enable_snapshot_restore_privilege: true
        check_snapshot_restore_write_privileges: true
        restapi:
          roles_enabled: ["all_access", "security_rest_api_access"]
        system_indices:
          enabled: true
          indices:
            [
              ".opendistro-alerting-config",
              ".opendistro-alerting-alert*",
              ".opendistro-anomaly-results*",
              ".opendistro-anomaly-detector*",
              ".opendistro-anomaly-checkpoints",
              ".opendistro-anomaly-detection-state",
              ".opendistro-reports-*",
              ".opendistro-notifications-*",
              ".opendistro-notebooks",
              ".opendistro-asynchronous-search-response*",
            ]
    ######## End OpenSearch Security Demo Configuration ########
  # log4j2.properties:

# Extra environment variables to append to this nodeGroup
# This will be appended to the current 'env:' key. You can use any of the kubernetes env
# syntax here
extraEnvs:
  - name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
    value: myStrongPassword123@456
#  - name: MY_ENVIRONMENT_VAR
#    value: the_value_goes_here

# Allows you to load environment variables from kubernextes secret or config map
envFrom: []
# - secretRef:
#     name: env-secret
# - configMapRef:
#     name: config-map

# A list of secrets and their paths to mount inside the pod
# This is useful for mounting certificates for security and for mounting
# the X-Pack license
secretMounts: []

hostAliases: []
# - ip: "127.0.0.1"
#   hostnames:
#   - "foo.local"
#   - "bar.local"


image:
  repository: "opensearchproject/opensearch"
  # override image tag, which is .Chart.AppVersion by default
  tag: ""
  pullPolicy: "IfNotPresent"


podAnnotations: {}
  # iam.amazonaws.com/role: es-cluster

# additionals labels
labels: {}

opensearchJavaOpts: "-Xmx512M -Xms512M"

resources:
  requests:
    cpu: "1000m"
    memory: "100Mi"

initResources: {}
  # limits:
  #   cpu: "25m"
  #   # memory: "128Mi"
  # requests:
  #   cpu: "25m"
  #   memory: "128Mi"

sidecarResources: {}
  # limits:
  #   cpu: "25m"
  #   # memory: "128Mi"
  # requests:
  #   cpu: "25m"
  #   memory: "128Mi"

networkHost: "0.0.0.0"

rbac:
  create: false
  serviceAccountAnnotations: {}
  serviceAccountName: ""

podSecurityPolicy:
  create: false
  name: ""
  spec:
    privileged: true
    fsGroup:
      rule: RunAsAny
    runAsUser:
      rule: RunAsAny
    seLinux:
      rule: RunAsAny
    supplementalGroups:
      rule: RunAsAny
    volumes:
      - secret
      - configMap
      - persistentVolumeClaim
      - emptyDir

persistence:
  enabled: true
  # Set to false to disable the `fsgroup-volume` initContainer that will update permissions on the persistent disk.
  enableInitChown: true
  # override image, which is busybox by default
  # image: busybox
  # override image tag, which is latest by default
  # imageTag:
  labels:
    # Add default labels for the volumeClaimTemplate of the StatefulSet
    enabled: false
  # OpenSearch Persistent Volume Storage Class
  # If defined, storageClassName: <storageClass>
  # If set to "-", storageClassName: "", which disables dynamic provisioning
  # If undefined (the default) or set to null, no storageClassName spec is
  #   set, choosing the default provisioner.  (gp2 on AWS, standard on
  #   GKE, AWS & OpenStack)
  #
  # storageClass: "-"
  accessModes:
    - ReadWriteOnce
  size: 8Gi
  annotations: {}

extraVolumes: []
  # - name: extras
  #   emptyDir: {}

extraVolumeMounts: []
  # - name: extras
  #   mountPath: /usr/share/extras
  #   readOnly: true

extraContainers: []
  # - name: do-something
  #   image: busybox
  #   command: ['do', 'something']

extraInitContainers: []
  # - name: do-somethings
  #   image: busybox
  #   command: ['do', 'something']

# This is the PriorityClass settings as defined in
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
priorityClassName: ""

# By default this will make sure two pods don't end up on the same node
# Changing this to a region would allow you to spread pods across regions
antiAffinityTopologyKey: "kubernetes.io/hostname"

# Hard means that by default pods will only be scheduled if there are enough nodes for them
# and that they will never end up on the same node. Setting this to soft will do this "best effort".
# Setting this to custom will use what is passed into customAntiAffinity.
antiAffinity: "soft"

# Allows passing in custom anti-affinity settings as defined in
# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity
# Using this parameter requires setting antiAffinity to custom.
customAntiAffinity: {}

# This is the node affinity settings as defined in
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
nodeAffinity: {}

# This is the pod affinity settings as defined in
# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#types-of-inter-pod-affinity-and-anti-affinity
podAffinity: {}

# The default is to deploy all pods serially. By setting this to parallel all pods are started at
# the same time when bootstrapping the cluster
podManagementPolicy: "Parallel"

# The environment variables injected by service links are not used, but can lead to slow OpenSearch boot times when
# there are many services in the current namespace.
# If you experience slow pod startups you probably want to set this to `false`.
enableServiceLinks: true

protocol: https
httpPort: 9200
transportPort: 9300
metricsPort: 9600

service:
  labels: {}
  labelsHeadless: {}
  headless:
    annotations: {}
  type: ClusterIP
  nodePort: ""
  annotations: {}
  httpPortName: http
  transportPortName: transport
  loadBalancerIP: ""
  loadBalancerSourceRanges: []
  externalTrafficPolicy: ""

updateStrategy: RollingUpdate

# This is the max unavailable setting for the pod disruption budget
# The default value of 1 will make sure that kubernetes won't allow more than 1
# of your pods to be unavailable during maintenance
maxUnavailable: 1

podSecurityContext:
  fsGroup: 1000
  runAsUser: 1000

securityContext:
  capabilities:
    drop:
      - ALL
  # readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000

securityConfig:
  enabled: true
  path: "/usr/share/opensearch/plugins/opensearch-security/securityconfig"
  actionGroupsSecret:
  configSecret:
  internalUsersSecret:
  rolesSecret:
  rolesMappingSecret:
  tenantsSecret:
  # The following option simplifies securityConfig by using a single secret and
  # specifying the config files as keys in the secret instead of creating
  # different secrets for for each config file.
  # Note that this is an alternative to the individual secret configuration
  # above and shouldn't be used if the above secrets are used.
  config:
    # There are multiple ways to define the configuration here:
    # * If you define anything under data, the chart will automatically create
    #   a secret and mount it.
    # * If you define securityConfigSecret, the chart will assume this secret is
    #   created externally and mount it.
    # * It is an error to define both data and securityConfigSecret.
    securityConfigSecret: ""
    data: {}
      # config.yml: |-
      # internal_users.yml: |-
      # roles.yml: |-
      # roles_mapping.yml: |-
      # action_groups.yml: |-
      # tenants.yml: |-

# How long to wait for opensearch to stop gracefully
terminationGracePeriod: 120

sysctlVmMaxMapCount: 262144

## Use an alternate scheduler.
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
schedulerName: ""

imagePullSecrets: []
nodeSelector: {}
tolerations: []

# Enabling this will publically expose your OpenSearch instance.
# Only enable this if you have security enabled on your cluster
ingress:
  enabled: false

  # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
  # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
  ingressClassName: nginx

  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  path: /
  hosts:
    - chart-example.local
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

nameOverride: ""
fullnameOverride: ""

masterTerminationFix: false

lifecycle: {}
  # preStop:
  #   exec:
  #     command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
  # postStart:
  #   exec:
  #     command:
  #       - bash
  #       - -c
  #       - |
  #         #!/bin/bash
  #         # Add a template to adjust number of shards/replicas1
  #         TEMPLATE_NAME=my_template
  #         INDEX_PATTERN="logstash-*"
  #         SHARD_COUNT=8
  #         REPLICA_COUNT=1
  #         ES_URL=http://localhost:9200
  #         while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done
  #         curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}'

keystore: []

networkPolicy:
  ## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
  ## In order for a Pod to access OpenSearch, it needs to have the following label:
  ## {{ template "uname" . }}-client: "true"
  ## Example for default configuration to access HTTP port:
  ## opensearch-master-http-client: "true"
  ## Example for default configuration to access transport port:
  ## opensearch-master-transport-client: "true"

  http:
    enabled: false

# Deprecated
# please use the above podSecurityContext.fsGroup instead
fsGroup: ""

## Set optimal sysctl's through securityContext. This requires privilege. Can be disabled if
## the system has already been preconfigured. (Ex: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html)
## Also see: https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/
sysctl:
  enabled: false

## Set optimal sysctl's through privileged initContainer.
sysctlInit:
  enabled: false
  # override image, which is busybox by default
  # image: busybox
  # override image tag, which is latest by default
  # imageTag:

## Enable to add 3rd Party / Custom plugins not offered in the default OpenSearch image.
plugins:
  enabled: false
  installList: []
  # - example-fake-plugin

Data:
I just changed the roles like below but with the same master contents:
echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch$ cat data.yaml

---
clusterName: "opensearch-cluster"
nodeGroup: "data"

# The service that non master groups will try to connect to when joining the cluster
# This should be set to clusterName + "-" + nodeGroup for your master group
masterService: "opensearch-cluster-master"

# OpenSearch roles that will be applied to this nodeGroup
# These will be set as environment variable "node.roles". E.g. node.roles=master,ingest,data,remote_cluster_client
roles:
  - master: false
  - ingest
  - data
  - remote_cluster_client: false

replicas: 2

Client:
I just changed the roles like below but with the same master contents:

---
clusterName: "opensearch-cluster"
nodeGroup: "client"

# The service that non master groups will try to connect to when joining the cluster
# This should be set to clusterName + "-" + nodeGroup for your master group
masterService: "opensearch-cluster-master"

# OpenSearch roles that will be applied to this nodeGroup
# These will be set as environment variable "node.roles". E.g. node.roles=master,ingest,data,remote_cluster_client
roles:
  - remote_cluster_client

replicas: 1

# if not set, falls back to parsing .Values.imageTag, then .Chart.appVersion.
majorVersion: ""

global:
  # Set if you want to change the default docker registry, e.g. a private one.
  dockerRegistry: ""

once this was not successful then i started to use the operator based deployment

Operator based deployment worked little better but the dashboard service did not spin up for some reason.
The values that i used i took it from the opensearch community and below is how it looks now:

values:
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
  name: my-cluster
  namespace: echinsi
spec:
  security:
    config:
    tls:
       http:
         generate: true 
       transport:
         generate: true
         perNode: true
  general:
    version: 2.14.0
    httpPort: 9200
    vendor: opensearch
    serviceName: my-cluster
    monitoring:
     enable: true
  dashboards:
    tls:
      enable: true
      generate: true
    version: 2.14.0
    enable: true
    replicas: 1
    resources:
      requests:
         memory: "512Mi"
         cpu: "500m"
      limits:
         memory: "512Mi"
         cpu: "500m"
  confMgmt:
    smartScaler: true
  nodePools:
    - component: masters
      pdb:
        enable: true
        minAvailable: 1
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "cluster_manager"
        - "data"
    - component: nodes
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "data"
    - component: coordinators
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "ingest"

i had to introduce the security part in this chart

  security:
    config:
    tls:
       http:
         generate: true 
       transport:
         generate: true
         perNode: true

else i got failure about the OPENSEARCH_INITIAL_ADMIN_PASSWORD absence.

echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch/opensearch-k8s-operator/opensearch-operator/examples/2.x$ k get pods
NAME                                                         READY   STATUS      RESTARTS      AGE
my-cluster-coordinators-0                                    1/1     Running     0             15h
my-cluster-coordinators-1                                    1/1     Running     0             15h
my-cluster-coordinators-2                                    1/1     Running     0             15h
my-cluster-masters-0                                         1/1     Running     0             15h
my-cluster-masters-1                                         1/1     Running     0             15h
my-cluster-masters-2                                         1/1     Running     0             15h
my-cluster-nodes-0                                           1/1     Running     0             15h
my-cluster-nodes-1                                           1/1     Running     0             15h
my-cluster-nodes-2                                           1/1     Running     0             15h
my-cluster-securityconfig-update-k6sbb                       0/1     Completed   0             15h
my-opensearch-operator-controller-manager-699f6f778c-wh8xj   2/2     Running     0             17h
echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch/opensearch-k8s-operator/opensearch-operator/examples/2.x$ helm list
NAME                  	NAMESPACE	REVISION	UPDATED                                 	STATUS  	CHART                    	APP VERSION
my-opensearch-operator	echinsi  	2       	2024-10-22 16:07:13.130946515 +0200 CEST	deployed	opensearch-operator-2.6.1	2.6.1      
echinsi@elx-cnd2273hqh:~/OneDrive/repos/opensearch/opensearch-k8s-operator/opensearch-operator/examples/2.x$ 

if I can get help either the HELM chart method or the Operator method, it would be great.

Hi,
Do you have any update for me :slight_smile:

I’m a bit lost here. Are you using helm charts or Operator?
Also, the mentioned article was published in 2021. Have you tested with the latest version of charts or Operator?

Operator GitHub contains the latest working examples.

@chinmoy In your OpenSearch charts this is incorrect.

roles:
  - master: false
  - ingest
  - data
  - remote_cluster_client: false

You should use this instead.

roles:
  - ingest
  - data

Hi @pablo ,
looks like someone tried to align the text i wrote and some contents that i wrote have gone missing.
Nevertheless i can explain what i did again.
Firstly I tried to work with the helm-charts which i had posted in the first parts of the thread where i have given the values for master,data and client.
I see that you have provided the changes that i need to follow for doing a deploy with charts.

Secondly when the first option failed to work for me, i started to use operators and i had to enable the below part to get it to work:

  security:
    config:
    tls:
       http:
         generate: true 
       transport:
         generate: true
         perNode: true

Operator based now i got it work, but my only issue is that the dashboard pods did not get deployed.

i used the below chart to get the operator based deployment to work, but without the dashboard pods.
So i want your help to get the dashboard pods working as well.

apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
  name: my-cluster
  namespace: echinsi
spec:
  security:
    config:
    tls:
       http:
         generate: true 
       transport:
         generate: true
         perNode: true
  general:
    version: 2.14.0
    httpPort: 9200
    vendor: opensearch
    serviceName: my-cluster
    monitoring:
     enable: true
  dashboards:
    tls:
      enable: true
      generate: true
    version: 2.14.0
    enable: true
    replicas: 1
    resources:
      requests:
         memory: "512Mi"
         cpu: "500m"
      limits:
         memory: "512Mi"
         cpu: "500m"
  confMgmt:
    smartScaler: true
  nodePools:
    - component: masters
      pdb:
        enable: true
        minAvailable: 1
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "cluster_manager"
        - "data"
    - component: nodes
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "data"
    - component: coordinators
      replicas: 3
      diskSize: "30Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "ingest"

@chinmoy Please remove this option from dashboards.

Regarding the helm charts, I’ve also tested your configuration, and I had no issues deploying the client, master, and data nodes in one cluster.
I’ve used values.yml from the OpenSearch helm charts on GitHub. As long as the masterService pointed to the same service in all data, client, and master, all the nodes were able to join the same cluster.

masterService: "opensearch-cluster-master"

Hi @pablo ,

it works now the Operator based deployment and i was able to get the dashboard to work as well.
Many many thanks for the support and help.

1 Like