<p>I have deployed the Bitnami helm chart of elasticsearch on the Kubernetes environment.</p>
<p><a href="https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch" rel="nofollow noreferrer">https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch</a></p>
<p>Unfortunately, I am getting the following error for the coordinating-only pod. However, the cluster is restricted.</p>
<p><strong>Pods &quot;elasticsearch-elasticsearch-coordinating-only-5b57786cf6-&quot; is forbidden: unable to validate against any pod security policy:
[spec.initContainers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]; Deployment does not have minimum availability.</strong></p>
<p>I there anything I need to adapt/add-in default <strong>values.yaml</strong>?</p>
<p>Any suggestion to get rid of this error?
Thanks.</p>

kishorK
<p>You can't validate if your cluster is restricted with some security policy. In your situation someone (assuming administrator) has blocked the option to run privileged containers for you.</p>
<p>Here's an example of how pod security policy blocks privileged containers:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: example
spec:
  privileged: false  # Don't allow privileged pods!
  seLinux:
    rule: RunAsAny

----
</code></pre>
<p>What is require for you is to have appropriate <code>Role</code> with a <code>PodSecurityPolicy</code> resource and <code>RoleBinding</code> that will allow you to run privileged containers.</p>
<p>This is very well explained in kubernetes documentation at <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#enabling-pod-security-policies" rel="nofollow noreferrer">Enabling pod security policy</a></p>
