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

**URL:** <https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388>\
**Category:** Uncategorized\
**Created:** [April 28, 2020, 4:55am UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388 "2020-04-28T04:55:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmpmohan](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cmpmohan](https://forums.portworx.com/u/cmpmohan)\
**Post date:** [April 28, 2020, 4:55am UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388/1 "2020-04-28T04:55:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sanjay.naikwadi](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.portworx.com/sanjay.naikwadi/32/35_2.png) [@sanjay.naikwadi](https://forums.portworx.com/u/sanjay.naikwadi)\
**Post date:** [April 28, 2020, 5:02am UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388/2 "2020-04-28T05:02:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmpmohan](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cmpmohan](https://forums.portworx.com/u/cmpmohan)\
**Post date:** [April 28, 2020, 5:33am UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388/3 "2020-04-28T05:33:01Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![sanjay.naikwadi](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.portworx.com/sanjay.naikwadi/32/35_2.png) [@sanjay.naikwadi](https://forums.portworx.com/u/sanjay.naikwadi)\
**Post date:** [April 28, 2020, 6:35am UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388/4 "2020-04-28T06:35:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sensre](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.portworx.com/sensre/32/299_2.png) [@sensre](https://forums.portworx.com/u/sensre)\
**Post date:** [June 9, 2021, 2:24pm UTC](https://forums.portworx.com/t/how-to-run-portworx-kubernetes-pods-as-non-root-user/388/6 "2021-06-09T14:24:39Z")

</div>

@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.
