<p>I discovered that it's a know <em>bug</em> of Elasticsearch version (7.10.x), after look this <a href="https://github.com/elastic/cloud-on-k8s/issues/3934" rel="nofollow noreferrer"><em>issue</em></a> and I set to the version <code>7.9.3</code> and works fine!</p>

CC BY-SA 4.0
2020-12-23T12:36:34.227Z
2020-12-23T12:36:34.227Z
Vader
<p><strong>My <em>setup</em></strong>:</p>
<h3>AWS EKS</h3>
<pre><code>* Platform: eks.3
* K8s: 1.18
</code></pre>
<h3>ECK (Elastic Cloud Kubernetes):</h3>
<pre><code>* Deployment via: Operator
* Elasticsearch version: 7.10.1
</code></pre>
<p><strong>Summary</strong></p>
<p>I'm trying to install the <code>repository-s3</code> plugin at Elasticsearch <em>pod</em>.</p>
<p>Here's my <code>YAML</code>:</p>
<pre><code>apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elastic-test
spec:
  version: 7.10.1
  http:
    tls:
      selfSignedCertificate:
        disabled: true
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false
    podTemplate:
      metadata:
        annotations:
          traffic.sidecar.istio.io/includeInboundPorts: &quot;*&quot;
          traffic.sidecar.istio.io/excludeOutboundPorts: &quot;9300,443&quot; 
          traffic.sidecar.istio.io/excludeInboundPorts: &quot;9300&quot;
      spec:
        automountServiceAccountToken: true
        initContainers:
          - name: install-plugins
            securityContext:
              privileged: true
            command: ['sh', '-c', 'bin/elasticsearch-plugin install --batch repository-s3']
</code></pre>
<p>And when I'm <em>applying</em> the deployment crashes:</p>
<pre><code>Exception in thread &quot;main&quot; org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/repository-s3
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/repository-s3
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:431)
    at java.base/java.nio.file.Files.newDirectoryStream(Files.java:476)
    at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)
    at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2840)
    at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:220)
    at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:129)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:354)
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
    at org.elasticsearch.cli.Command.main(Command.java:90)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /usr/share/elasticsearch/logs/elastic-test.log
</code></pre>
<p>Has someone managed to get around this?</p>

<kubernetes><elasticsearch>
ECK - Install Plugins: Error privileges
Vader
# ECK - Install Plugins: Error privileges

(Asked by: username_0 on 2020-12-22)

My setup:
AWS EKS
* Platform: eks.3
* K8s: 1.18

ECK (Elastic Cloud Kubernetes):
* Deployment via: Operator
* Elasticsearch version: 7.10.1

Summary
I'm trying to install the repository-s3 plugin at Elasticsearch pod.
Here's my YAML:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elastic-test
spec:
  version: 7.10.1
  http:
    tls:
      selfSignedCertificate:
        disabled: true
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false
    podTemplate:
      metadata:
        annotations:
          traffic.sidecar.istio.io/includeInboundPorts: "*"
          traffic.sidecar.istio.io/excludeOutboundPorts: "9300,443" 
          traffic.sidecar.istio.io/excludeInboundPorts: "9300"
      spec:
        automountServiceAccountToken: true
        initContainers:
          - name: install-plugins
            securityContext:
              privileged: true
            command: ['sh', '-c', 'bin/elasticsearch-plugin install --batch repository-s3']

And when I'm applying the deployment crashes:
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/repository-s3
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/repository-s3
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:431)
    at java.base/java.nio.file.Files.newDirectoryStream(Files.java:476)
    at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)
    at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2840)
    at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:220)
    at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:129)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:354)
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
    at org.elasticsearch.cli.Command.main(Command.java:90)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /usr/share/elasticsearch/logs/elastic-test.log

Has someone managed to get around this?

**Tags:** kubernetes, elasticsearch


---

## 1 answers

### Answer by username_0 on 2020-12-23. Score: 1

I discovered that it's a know *bug* of Elasticsearch version (7.10.x), after look this [*issue*](https://github.com/elastic/cloud-on-k8s/issues/3934) and I set to the version `7.9.3` and works fine!


---

