Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/modules/airflow/pages/usage-guide/operations/restart.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
= Service Restarts

== Manual Restarts

Sometimes it is necessary to restart services deployed in Kubernetes. A service restart should induce as little disruption as possible, ideally none.

Kubernetes offers rollout mechanism for this purpose. You can use `kubectl rollout restart statefulset` to restart the Airflow `scheduler`, `webserver` or `worker` Pods.

For example, given the following stateful sets deployed for an Airflow cluster:

[source,shell]
----
❯ kubectl get sts
NAME READY AGE
airflow-scheduler-default 1/1 61m
airflow-webserver-default 1/1 61m
airflow-worker-default 2/2 61m
postgresql-airflow 1/1 64m
redis-airflow-master 1/1 64m
redis-airflow-replicas 1/1 64m
----

To restart the Airflow scheduler, run:

[source,shell]
----
❯ kubectl rollout restart statefulset airflow-scheduler-default
statefulset.apps/airflow-scheduler-default restarted
----

NOTE: When using Airflow's https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/kubernetes.html[Kubernetes executor], `worker` Pods are created dynamically by DAGs when needed, this in general it's not necessary to restart them.

== Automatic Restarts

The Commons Operator of the Stackable Platform might restart Pods automatically, for example to ensure that security certificates are up-to-date. For details, see the xref:commons:index.adoc[Commons Operator documentation].
1 change: 1 addition & 0 deletions docs/modules/airflow/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
*** xref:airflow:usage-guide/operations/pod-placement.adoc[]
*** xref:airflow:usage-guide/operations/pod-disruptions.adoc[]
*** xref:airflow:usage-guide/operations/graceful-shutdown.adoc[]
*** xref:airflow:usage-guide/operations/restart.adoc[]