Set custom WordPress Readiness Probe
Details on how to tweak the readiness probe timings and path.
You might wish to tweak the readiness probe of the wordpress container, if the containers on which it depends take longer than usual to become ready, or if you want to use a custom health check. This document will explain how it can be done.
1. Stop the dashboard-controller from overriding your custom changes.
For this example, let's assume the project namespace is proj-jqojzq and the site name is my-site-com-h9wgm.
The command below will tell the dashboard-controller only to reconcile the host header of the readiness probe. So when the site's primary domain (the first domain in the domains list) changes, it will reflect in the readiness probe as well:
kubectl annotate wordpress -n proj-jqojzq my-site-com-h9wgm site.presslabs.com/reconcile-readiness-probe=only-http-host-header
If you want to be able to change the host as well, you may stop the dashboard-controller from reconciling the readiness probe altogether, by issuing the following command:
kubectl annotate wordpress -n proj-jqojzq my-site-com-h9wgm site.presslabs.com/reconcile-readiness-probe=false
2. Make the changes you want to the readiness probe
Run the following command:
kubectl edit wordpress -n proj-jqojzq my-site-com-h9wgm
readinessProbe section, which can be found under the
spec section. There are other readiness probes belonging to other containers, so make sure you edit the right one. It should initially look like this:
readinessProbe: failureThreshold: 3 httpGet: httpHeaders: - name: Host value: my.site.com path: /?nocache port: 8080 initialDelaySeconds: 10 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 30
3. If you wish to revert to the default readiness probe [optional]
The following commands will revert your custom changes:
kubectl annotate wordpress -n proj-jqojzq my-site-com-h9wgm site.presslabs.com/reconcile-readiness-probe=true
Add a preemptible node
To reduce the costs, you can run PHP pods on cheaper nodes.
Add custom init containers
If you want to run migrations or perform other operations that are required before your site starts, [...]
Sometimes you will need to set custom variables in ProxySQL configuration or you will want to cache [...]
Increase the default limit range resources
Presslabs Dashboard has default limit ranges for memory and CPU, which you can modify to accommodate [...]