where is the /healthz endpoint in the php code?
@tomazzaman sorry i cannot find the locs where you implement the /healthz entry on the php code, can you please point me there? thanks 👍 👴 I hold the 🔑 he he.
very frustrated now, on your https://codeable.io/wordpress-developers-intro-to-docker-part-three-kubernetes/ blog you set liveprobes and readinessprobes and here i fail to see the /healthz endpoint it means this wordpress does not have anything there?
There are differences between the image generated in the tutorials and the one available from codeable/kubepress:4.8.1 ... the latter image configures the /healthz endpoint in /etc/nginx/conf.d/default.conf, not via wordpress.
# Health check for Kubernetes readiness probe
location /healthz {
access_log off;
return 200;
}
This may be a necessary workaround because Ingress doesn't allow any traffic through to the backend service until the service returns a 200 from an endpoint, but WordPress always returns a 301 (permanent redirect) if the host header of a request doesn't match the configured site url, so the service is never considered 'healthy' when wordpress is allowed to answer the health-check.