How to validate against any pod security policy issue during deployment elasticsearch

I have deployed the Bitnami helm chart of elasticsearch on the Kubernetes environment.

https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch

Unfortunately, I am getting the following error for the “coordinating-only” pod. However, the cluster is restricted.

Pods “elasticsearch-elasticsearch-coordinating-only-5b57786cf6-” 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.

I am not sure but I guess PodSecurityPolicy, ClusterRoleBinding, and ClusterRoles should be created? Do I need to create serviceaccount also?

I am pretty new to K8s. can any expert or experienced the same issue and can support me in creating the above stuff?

Your help will be really grateful. Thanks.

Hello @kishorkotule1 , please refer k8s official documentation so that you will get idea on pod security policies

pod-security-policy

1 Like