How do I resolve permission issue with K8s
I am running an AdonisJs app using K8s deployment,
and I am using a package called Adonis Responsive Attachment. https://github.com/ndianabasi/adonis-responsive-attachment which depends on AWS s3 buckets ( I have tried same with Linode buckets as well )
I am getting this error anytime I do file upload.
{
"message": "E_CANNOT_WRITE_FILE: Cannot write file at location \"gallery/cljd6qihn000107m6ead73s92.jpg\""
}
I tried deploying on a different server , and it worked without this error,
I seem to only have this error on Linode K8s. or maybe I am not configuring my Deployments well,
See a sample of the deployment codes I am using
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
labels:
app.kubernetes.io/name: myapp
app.kubernetes.io/version: '1.0.0'
app.kubernetes.io/managed-by: kubectl
spec:
replicas: 1
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
securityContext:
runAsUser: 2500
runAsGroup: 3000
fsGroup: 2000
fsGroupChangePolicy: "OnRootMismatch"
containers:
- name: myapp
image: roqkabel/myapp-app:$TAG
envFrom:
- secretRef:
name: myapp-secret
ports:
- containerPort: 3000
securityContext:
capabilities:
add: ["NET_ADMIN"]
allowPrivilegeEscalation: false
volumes:
- name: cache-volume
emptyDir:
sizeLimit: 500Mi