Init container fails due to license

I deployed the latest operator version 1.4.0 and it was successful. I created a Elasticsearch instance using the yaml below:

    apiVersion: elasticsearch.k8s.elastic.co/v1
    kind: Elasticsearch
    metadata:
      name: elasticsearch-instance
    spec:
      nodeSets:
        - name: master-nodes
          count: 3
          config:
            node.roles: ["master"]
            nodeStoreAllowMmap: false
            xpack.ml.enabled: true
            node.remote_cluster_client: false
          podTemplate:
            metadata:
              labels:
                foo: bar
            spec:
              containers:
                - name: elasticsearch
                  resources:
                    limits:
                      cpu: 2
                      memory: 4Gi
                    requests:
                      cpu: 1
                      memory: 4Gi
          volumeClaimTemplates:
          - metadata:
              name: elasticsearch-data
            spec:
              accessModes:
              - ReadWriteOnce
              resources:
                requests:
                  storage: 5Gi
        - name: data-nodes
          count: 5
          config:
            node.roles: ["data", "ml", "ingest", "transform"]
            node.remote_cluster_client: false
          volumeClaimTemplates:
          - metadata:
              name: elasticsearch-data
            spec:
              accessModes:
              - ReadWriteOnce
              resources:
                requests:
                  storage: 15Gi
      version: 7.11.1

However, none of my pods are starting. All the init containers are failing on the license check with the below log message:
unsupported_distribution

I understand the default elastic search uses the Basic license. In my case, it seems it cannot find it.

Please help

I suspect what you're experiencing is related to this issue, fixed in ECK 1.4.0.

Can you please double check what version of ECK you are using?
You can do that by examining the elastic-operator pod's spec.containers.image setting.
For example:

kubectl -n elastic-system get pod elastic-operator-0 -o | yaml | grep 1.4.0

It should output something like this:

    checksum/config: 0d548bc052adb33254689ac24a212460301624526d6dc5336fb42d10c9775770
    image: docker.elastic.co/eck/eck-operator:1.4.0
    image: docker.elastic.co/eck/eck-operator:1.4.0

Other than that I see some potential issues with your manifest:

  • You don't need to set node.remote_cluster_client: false as you are specifying node roles explicitly using node.roles (afaik you cannot have both of these settings specified together)
  • nodeStoreAllowMmap should be changed to node.store.allow_mmap and set for both of the nodeSets you in your manifest

thanks. yes. it was version issue. I used helm to install the operator. However, as I did not update the chart repo before installing, it installed the previous version 1.3.x instead of the latest 1.4.0. After updating the chart repo and upgrading the operator, installation is successful.

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