<p>When i deploy this Deployment for sock-shop
<a href="https://github.com/microservices-demo/microservices-demo/blob/master/deploy/kubernetes/complete-demo.yaml" rel="nofollow noreferrer">Yaml for sock-shop</a></p>

<p>but it does not give me write permission in the container so i cannot even write in it</p>

<pre><code>$ kubectl exec -it carts-5496ffc4b6-5xr68 -n sock-shop -- sh
/usr/src/app $ apk add python
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
/usr/src/app $ echo "Hello world" &gt; sample.txt
sh: can't create sample.txt: Permission denied
/usr/src/app $ 
</code></pre>

Pradeep Padmanaban C
<p>You need to run the pod as root to be able to get that permission.Edit the yaml and add below in the <code>carts</code> deployment</p>

<pre><code>securityContext:
  runAsUser: 0
</code></pre>

<p>Recommended option would be run <code>apk add python</code> in the Dockerfile itself and create a image with it installed already.</p>
