About /tmp/readiness Readiness Probes

Readiness probes can also be useful if you want to replace one or more Nodes in your Kubernetes cluster. In this case, you can cause Kubernetes to drain the workload from the Node. This causes Kubernetes to evict any Pods that are running on that Node and create new Pods on other Nodes in the cluster to replace them. Kubernetes supports a Pod disruption budget whereby you specify a budget for your application. This budget tells Kubernetes how many evicted Pods in a given Deployment can be tolerated. For example, assume you configure a Deployment with 20 replicas of your application. You could tell Kubernetes to tolerate up to 5 of the replicas being down at a time. When moving a workload from one Node to another, Kubernetes is careful not to delete more than 5 replicas at a time, and waits for their replacements to become ready before deleting more.

In the case of the TimesTen Operator, you can use the /tmp/readiness readiness probe to prevent Kubernetes from terminating both the active and standby TimesTen Classic databases simultaneously while draining Kubernetes Nodes.

If you use a Pod disruption budget of 1 on TimesTen, you can drain the workload from one or more Nodes without creating a total TimesTen outage. When Kubernetes deletes a Pod that is running TimesTen in TimesTen Classic, Kubernetes does not know if the Pod contains an active or a standby database. Therefore, it may choose to delete the Pod that contains the active database. This causes a failover to the standby, which disrupts applications if performed during normal hours. There is no way to prevent this. However, Kubernetes does not proceed to delete the other database until the one that was deleted comes back up and is completely in the Healthy state.

For more information on the health of a Pod and the Healthy state, see About Monitoring the Health of Each Pod in an Active Standby Pair.

For information on Kubernetes Pod disruption budgets, see https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ and https://kubernetes.io/docs/tasks/run-application/configure-pdb/.