# Init container fails due to license

**URL:** <https://discuss.elastic.co/t/init-container-fails-due-to-license/266695>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 9, 2021, 12:31pm UTC](https://discuss.elastic.co/t/init-container-fails-due-to-license/266695 "2021-03-09T12:31:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smsajid](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@smsajid](https://discuss.elastic.co/u/smsajid)\
**Post date:** [March 9, 2021, 12:31pm UTC](https://discuss.elastic.co/t/init-container-fails-due-to-license/266695/1 "2021-03-09T12:31:16Z")

</div>

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

```auto
    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

---

<div class="post-metadata">

**Author:** ![idanmo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanmo/32/50092_2.png) [@idanmo](https://discuss.elastic.co/u/idanmo)\
**Post date:** [March 9, 2021, 3:06pm UTC](https://discuss.elastic.co/t/init-container-fails-due-to-license/266695/2 "2021-03-09T15:06:07Z")

</div>

I suspect what you're experiencing is related to [this](https://github.com/elastic/cloud-on-k8s/issues/4234) 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:

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

```

It should output something like this:

```bash
    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

---

<div class="post-metadata">

**Author:** ![smsajid](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@smsajid](https://discuss.elastic.co/u/smsajid)\
**Post date:** [March 10, 2021, 10:42am UTC](https://discuss.elastic.co/t/init-container-fails-due-to-license/266695/3 "2021-03-10T10:42:30Z")

</div>

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.

---

<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:** [April 7, 2021, 10:43am UTC](https://discuss.elastic.co/t/init-container-fails-due-to-license/266695/4 "2021-04-07T10:43:27Z")

</div>

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