# Official elasticsearch helm chart - Unable to install plugins

**URL:** <https://discuss.elastic.co/t/official-elasticsearch-helm-chart-unable-to-install-plugins/275593>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [June 10, 2021, 3:30pm UTC](https://discuss.elastic.co/t/official-elasticsearch-helm-chart-unable-to-install-plugins/275593 "2021-06-10T15:30:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xadamz23](https://avatars.discourse-cdn.com/v4/letter/x/e47774/32.png) [@xadamz23](https://discuss.elastic.co/u/xadamz23)\
**Post date:** [June 10, 2021, 3:30pm UTC](https://discuss.elastic.co/t/official-elasticsearch-helm-chart-unable-to-install-plugins/275593/1 "2021-06-10T15:30:40Z")

</div>

Hello,

I'm using the official elasticsearch helm chart ([elasticsearch 7.13.1 · elastic/elastic](https://artifacthub.io/packages/helm/elastic/elasticsearch)) and I'm trying to use "extraInitContainers" to install the "repository-azure" plugin. I do know that the recommended way to install plugins is to create a custom docker image, but I would rather use an init container.

Here are my helm commands:

```auto
helm repo add elastic https://helm.elastic.co
helm -n efk -f values.yaml install elasticsearch elastic/elasticsearch

```

Here is my values.yaml file:

```auto
extraInitContainers:
  - name: install-plugins
    image: docker.elastic.co/elasticsearch/elasticsearch:7.13.1
    imagePullPolicy: IfNotPresent
    command:
    - sh
    - -c
    - |
      bin/elasticsearch-plugin install --batch repository-azure

```

The pods come up fine:

```auto
NAME READY STATUS RESTARTS AGE
elasticsearch-master-0 1/1 Running 0 16m
elasticsearch-master-1 1/1 Running 0 16m
elasticsearch-master-2 1/1 Running 0 16m

```

But the plugin does not get installed:

```auto
curl -s -X GET http://central-logging-es.cbreesi.com/_nodes?filter_path=nodes.*.plugins | jq .
{
  "nodes": {
    "sSyIwbzXSDy39IFstwE30Q": {
      "plugins": []
    },
    "MDI79D9AQl21visj2dZ03A": {
      "plugins": []
    },
    "0T-DaBSbTxiznEmawbpgTw": {
      "plugins": []
    }
  }
}

```

More verification that the plugin was not installed:

```auto
$ kubectl -n efk exec --stdin --tty elasticsearch-master-0 -- /bin/sh
Defaulted container "elasticsearch" out of: elasticsearch, configure-sysctl (init), install-plugins (init)
sh-4.4$ bin/elasticsearch-plugin list
sh-4.4$
sh-4.4$ ls plugins
sh-4.4$

```

What am I doing wrong?

Thanks

**SOLVED**  
None of the documentation I found mentioned that you need a volume mount for this to work. So I experimented and got the plugin installed with the following values.yaml:

```auto
# init container to install the azure repository plugin for backup snapshots
extraInitContainers:
  - name: install-plugins
    image: docker.elastic.co/elasticsearch/elasticsearch:7.13.1
    imagePullPolicy: IfNotPresent
    command:
    - sh
    - -c
    - |
      bin/elasticsearch-plugin install --batch repository-azure
    volumeMounts:
    - name: plugins
      mountPath: /usr/share/elasticsearch/plugins

# Volume mount to store the repository-azure plugin
extraVolumes:
  - name: plugins
    emptyDir: {}
extraVolumeMounts:
  - name: plugins
    mountPath: /usr/share/elasticsearch/plugins
    readOnly: false

```

---

<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:** [July 8, 2021, 3:31pm UTC](https://discuss.elastic.co/t/official-elasticsearch-helm-chart-unable-to-install-plugins/275593/2 "2021-07-08T15:31:31Z")

</div>

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