I have a Kubernetes pod running Laravel but I get the following permission error on load:
If I access the pod interactively and run chmod on /storage:
The laravel app works. How can I get this command to run on deployment? I've tried the following but I get a 502 nginx error:
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
selector:
matchLabels:
container: app
template:
metadata:
labels:
container: app
spec:
containers:
- name: app
image: my/toolkit-app:test
command: ["chmod -R 777 /storage"]
securityContext:
runAsUser: 0
ports:
- containerPort: 80
imagePullSecrets:
- name: my-cred