I recently came across the Demo: “Deploy to GKE from GitLab” on YouTube; https://www.youtube.com/watch?v=u3jFf3tTtMk. I was able to successfully deploy the “minimal rails app”: https://gitlab.com/zanematthew/minimal-rails-app/pipelines/32222121, however, I’m interested in deploying a PHP-FPM + Nginx app.
I started with the Auto-DevOps yaml, https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/Auto-DevOps.gitlab-ci.yml, the pipeline is able to build the image, however, after being deployed to the cluster NGINX is returning a 503 error, the logs are showing “CrashLoopBackOff”.
I’ve Googled the error, but k8, Ingress, and helm, are very new to me.
Can anyone explain why this deployment is not working? Or if can someone point myself or others to a “minimal php app” that uses CI/CD and your Google K8 service that would be great. This seems to be a common question here.
I’ve come across a few example PHP projects on GitLab, and in the docs, but none cover CD and your Google K8 service.
The job that fails is; https://gitlab.com/zanematthew/sample-php/-/jobs/106608451