How to run portworx kubernetes POD's as non-root user

We getting below error message after added the RunAsUser: 1000 in yaml file. please help us to fix issue.

Error: container has runAsNonRoot and image will run as root

Hi,

Can you describe your issue in detail ?

  • Which Platform - Onprem / Cloud - AKS/EKS/GKE/OCP
  • Which PX-Version
  • Which Image your trying and what is error your getting

Regards
Sanjay N

We are trying to deploy it on kubernetes in openstack cloud

we have followed this docs https://docs.portworx.com/portworx-install-with-kubernetes/on-premise/airgapped/ to download the images

kubectl get pods -n portworx
NAME READY STATUS RESTARTS AGE
autopilot-7f9d57fc8c-4hjkp 0/1 CreateContainerConfigError 0 34m
grafana-565cff59fb-cfb4k 0/1 ImagePullBackOff 0 34m
px-lighthouse-66b857f546-rv6sz 0/3 Init:CreateContainerConfigError 0 34m
stork-8559d74546-7rbh8 0/1 CreateContainerConfigError 0 34m
stork-8559d74546-c55jg 0/1 CreateContainerConfigError 0 34m
stork-8559d74546-h5dmk 0/1 CreateContainerConfigError 0 34m
stork-scheduler-5b64f688b9-c7dxf 0/1 CreateContainerConfigError 0 34m
stork-scheduler-5b64f688b9-khn64 0/1 CreateContainerConfigError 0 34m
stork-scheduler-5b64f688b9-m9fm6 0/1 CreateContainerConfigError 0 3

Error: container has runAsNonRoot and image will run as root

Can you share the spec file used for installation ?

Are you trying to install portworx as non-root user ? Portworx needs root privileges and will not work if you try to non-root user.

Also default you need to install in kube-system namespace.

@cmpmohan were you able to install the portworx successfully as Sanjay mentioned? you need to run the portworx with root access. let us know for any further assistance.