Issue mounting volume #658
Replies: 3 comments
-
How are your permissions set? I think if kubernetes is creating that directory Or in AKS it looks like Azure/AKS#225 (comment) |
Beta Was this translation helpful? Give feedback.
-
I think the securitycontext is the issue, we have set the permissions as 777 for www-data in the PVC as instructed in documentation. But I think you're right about the securitycontext being the issue. When I try to specify to run the securitycontext to run as non root user it cannot start the wordpres container. Should the docker image be modified? |
Beta Was this translation helpful? Give feedback.
-
There was this discussion that I know of with similar a issue #623 (comment) Also if you're running the container itself as non-root you'll need |
Beta Was this translation helpful? Give feedback.
-
Hello
We are building a docker image on top of this Wordpress 5.8.1 Apache image to use in our AKS cluster. In our image we add a list of plugins along with a parent theme. Plugins are working fine, so that's great.
However we are experiencing an issue with the theme. We add a theme called Yootheme in the image build process by running:
ADD themes/ /usr/src/wordpress/wp-content/themes
where the themes directory contains yootheme.When we deploy a pod in our AKS cluster we mount certain directories from a PVC onto the pod. The volumemounts we configure are the following:
volumeMounts:
- mountPath: /var/www/html/wp-content/themes/yootheme/fonts/
name: wp-data
subPath: fonts
- mountPath: /var/www/html/wp-content/themes/yootheme-child/
name: wp-data
subPath: yootheme-child
- mountPath: /var/www/html/wp-content/uploads/
name: wp-data
subPath: uploads
The yootheme-child and uploads directories work perfectly fine, but the fonts in the yootheme directory overwrites the entire yootheme directory, so when we deploy a pod only the /var/www/html/wp-content/themes/yootheme/fonts/ directory exists. When we bash into the pod we can see that the permissions for the yootheme folder is changed to root, while the other folders have www-data as owner, and if we comment out the fonts volume mont, the yootheme folder is working as intended with www-data as owner.
So we would love some input on what could be causing the issue, since we're confused about the fact that the other two mounts work, while Fonts doesnt.
Beta Was this translation helpful? Give feedback.
All reactions