I recently had the problem that out of a sudden why Gitlab pages weren’t accessible any longer. I got a nasty “502 bad gateway” error. Gitlab is running on a kubernetes cluster and ingress is handled by Nginx for my domain.
I first thought that there’s a problem with the ingress, but everything seemed to be fine here. I than checked the gitlab-pages logs with
1 gitlab-ctl tail gitlab-pages
directly in the docker container.
This revealed the following error message
Failed to bind mount /var/opt/gitlab/gitlab-rails/shared/pages on /tmp/gitlab-pages-1524473513642136363/pages. operation not permitted
I found that this is already handled in Issue 45639 and the solution is to either give more rights to the container or add the option
1 gitlab_pages['inplace_chroot'] = true
I did that and everything is running smooth again.