KubePress icon indicating copy to clipboard operation
KubePress copied to clipboard

where is the /healthz endpoint in the php code?

Open cordoval opened this issue 8 years ago • 2 comments

@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.

cordoval avatar Jul 12 '17 17:07 cordoval

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?

cordoval avatar Jul 12 '17 17:07 cordoval

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.

richehmer avatar Dec 20 '17 23:12 richehmer