Skip to main content
In Astro Private Cloud (APC), you can create liveness and readiness probes to assess whether your Kubernetes Pods or network are healthy and can process requests. Some components in APC include liveness and readiness probes by default, but all components support adding and configuring them. APC allows you to use the Kubernetes liveness and readiness probe definitions so you can monitor the state of your Pods.
Liveness probes can be useful in all cases. However, readiness probes might be most useful for the following scenarios:
  • If you have network ports open on the container.
  • If a container doesn’t have open ports but has multiple processes.
  • If a process in a container might never reach a healthy state because it’s waiting for some state to be achieved.

Default probe behavior

You can use the following structure to define your probes in your values.yaml file. For example, you might want to adjust any default values by configuring the amount of time until a timeout. You can add any definitions that are compatible with Kubernetes probes. However, because Kubernetes doesn’t allow having more than one handler of probes, you must be sure that you don’t define probes that use both exec and httpGet. For consistency, the examples shown in the Default Astronomer Helm probe configurations use httpGet, but you can use exec when appropriate.

Liveness probe templates

Readiness probe templates

Retrieve existing probe definitions

You can retrieve the default probe definitions from the Kubernetes manifest. The following example shows how to retrieve the definitions for Houston.
This command produces a large amount of yaml output describing your Houston configuration. Within this output is a section describing the livenessProbe, which looks like this:
You can copy and paste this output into your values.yaml file for your Houston configuration, then adjust the values you want to customize. Then apply a platform config change.

Reference Helm values within your probes

The liveness and readiness probes specified in Helm values are passed through the Helm template function, which allows you to reference other Helm values within the probes. Specifically, the livenessProbe and readinessProbe values are rendered to yaml, then passed through the Helm template function, which renders any Helm template syntax into the produced yaml. For example, instead of hardcoding values for your probes to match values defined by other configurations in your values.yaml file, you can use the configuration variable itself. The following example, using the alertmanager yaml configuration, shows how the path and ports are defined by Values.ports.http and Values.prefixURL elsewhere in the values.yaml file.

Default Astronomer Helm probe configurations

The following components have their default probe configuration defined in the Astronomer Helm chart. If a component doesn’t have probes defined by default, you can see which components support custom probe configurations below.

Airflow Operator

The following can also be configured to include liveness and readiness probes:

Alert manager

The following can also be configured to include liveness and readiness probes:

Astronomer

The following can also be configured to include liveness and readiness probes:

Elasticsearch

The following components don’t have probes configured by default:

External-es-proxy

The following components don’t have probes configured by default:

Vector

The following components don’t have probes configured by default:

Global

The following components don’t have probes configured by default:

Grafana

The following components don’t have probes configured by default:

Kube-state

The following components don’t have probes configured by default:

NATS

The following components don’t have probes configured by default:

nginx

The following components don’t have probes configured by default:

PgBouncer

PostgreSQL

The following components don’t have probes configured by default:

Prometheus

The following components don’t have probes configured by default:

STAN

The following components don’t have probes configured by default:

Default Airflow chart probe configurations

You can also define liveness and readiness probes using the Astronomer Airflow chart.

Airflow

This includes:
  • dagProcessor
  • flower
  • pgbouncer
  • postgresql
  • scheduler
  • triggerer
  • webserver
  • workers

Auth sidecar

The following can also be configured to include liveness and readiness probes:

Dag deploy server

The following can also be configured to include liveness and readiness probes:

Logging sidecar

The following can also be configured to include liveness and readiness probes: