Pods that come back on their own,
state that is kept.
Kubernetes notices a container with a problem and acts on its own, and the Kafka, ClickHouse, and NiFi operators reconcile the resources they manage until the environment matches the declared state.
- Self-healing
- Scenario: cold start of the Kafka cluster
- Operators maintain the declared state
- What the operator does and what stays with the team
Self-healing
Kubernetes notices a container with a problem and acts on its own.
Probes, when configured, are periodic checks that Kubernetes performs on the containers.
The liveness probe can detect a container that stopped responding and trigger its restart.
The readiness probe signals whether the Pod is ready and removes it from the ready endpoints of the Services while the check fails.
The startup probe gives slow initializations time to complete before liveness and readiness take effect.
In addition, Kubernetes controllers recreate lost Pods to keep the declared number of replicas.
Recovering a Pod is not the same as keeping the service available: while it restarts, the service may be unavailable, especially in components with a single instance, such as the Trino coordinator.
Airflow, CloudBeaver, Kafka (brokers), NiFi, OpenMetadata, Superset and Spark History Server ship with the probes defined.
Airflow, OpenMetadata, Superset and PostgreSQL use the startup probe to protect initialization.
The initial delay, interval, timeout and failure threshold of each probe are defined in the component values file.
Scenario: cold start of the Kafka cluster
Situation: after a full shutdown, the Kafka nodes defined in nodePool.replicas start together, recover their logs and form the metadata quorum.
In the TDP default profile, each node takes on both the broker and controller roles.
What TDP does: the Kafka chart defines probes that are more tolerant than the Strimzi defaults, with these values:
probes:
liveness:
initialDelaySeconds: 60
timeoutSeconds: 30
periodSeconds: 30
failureThreshold: 10
readiness:
initialDelaySeconds: 60
timeoutSeconds: 30
periodSeconds: 30
failureThreshold: 10
Effect: the brokers have time to recover their logs and form the quorum before the probes trigger a restart.
Reduce these values only after testing a cold start of the entire Kafka cluster.
Stricter probes can restart the brokers before the quorum forms.
Operators maintain the declared state
The cluster is described in a Kubernetes resource, and the operator reconciles the resources it manages.
In the TDP Kubernetes deployment, Kafka, ClickHouse and NiFi are declared as custom resources and managed by the operators below. These projects can also be deployed through other mechanisms. The TDP guides follow this integration.
The operator of each one watches the resource and creates, recreates and updates Pods, Services and volumes until the environment matches what was declared.
Kafka
Strimzi
Manages brokers, topics and users. During updates, it restarts the brokers one at a time.
ClickHouse
Altinity ClickHouse Operator
Reconciles the ClickHouseInstallation, with shards, replicas, volumes and cluster configuration.
NiFi
NiFiKop
Creates, monitors and updates the NiFi nodes declared in the NifiCluster.
What the operator does and what stays with the team
The operator keeps the environment consistent with the declared resource.
The desired state is declared by the team that operates the environment.
| Activity | Who handles it | In TDP Kubernetes |
|---|---|---|
| Provision | Operator | From the declared resource, the operator creates Pods, Services and volumes: Strimzi for Kafka, KafkaTopic and KafkaUser; the Altinity ClickHouse Operator for ClickHouseInstallation and ClickHouseKeeperInstallation; NiFiKop for the NifiCluster nodes. |
| Update | Operator | A change to the resource is applied by the operator. In Kafka, Strimzi restarts the brokers one at a time. |
| Recreate Pods | Operator | When a managed Pod is lost, the operator recreates it so that the environment matches the declared state again. |
| Reconcile the configuration | Operator | The Altinity ClickHouse Operator reconciles the shards, replicas, volumes and configuration declared in the ClickHouseInstallation. In NiFi, administrators and readers can be maintained declaratively by NiFiKop (nifiCluster.authorization). |
| Declare the desired state | Team | Replicas, resources and configuration are kept in the chart values file, applied with Helm or by Argo CD. |
See also
Service and data
Replicas and distribution across nodes
Replicas and replicated data per component, and how the replicas are distributed across nodes.
Continuity
Maintenance and persistence
Protections during maintenance, volumes that outlive the Pod and release rollback.