Skip to content

Commit 7149e7d

Browse files
committed
Rename stacklet to myairflow
1 parent c7942e9 commit 7149e7d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

modules/concepts/pages/operations/cluster_operations.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,45 @@ Sometimes it is necessary to restart services deployed in Kubernetes. A service
2828

2929
Most operators create StatefulSet objects for the products they manage and Kubernetes offers a rollout mechanism to restart them. You can use `kubectl rollout restart statefulset` to restart a StatefulSet previously created by an operator.
3030

31-
For example, an Airflow stack will have three ServiceSets created for it: `scheduler`, `webserver` and `worker`. So given the following stateful sets deployed for an Airflow stacklet:
31+
To illustrate how to use the command line to restart one or more Pods, we will assume you used the Stackable Airflow Operator to deploy an Airflow stacklet called `myairflow`.
32+
33+
This stacklet will consist, among other things, of three ServiceSets created for each Airflow role: `scheduler`, `webserver` and `worker`. Let's list them:
3234

3335
[source,shell]
3436
----
3537
❯ kubectl get sts
3638
NAME READY AGE
37-
airflow-scheduler-default 1/1 61m
38-
airflow-webserver-default 1/1 61m
39-
airflow-worker-default 2/2 61m
39+
myairflow-scheduler-default 1/1 61m
40+
myairflow-webserver-default 1/1 61m
41+
myairflow-worker-default 2/2 61m
4042
postgresql-airflow 1/1 64m
4143
redis-airflow-master 1/1 64m
4244
redis-airflow-replicas 1/1 64m
4345
----
4446

45-
To restart the Airflow scheduler, run:
47+
To restart the Airflow scheduler Pod, run:
4648

4749
[source,shell]
4850
----
49-
❯ kubectl rollout restart statefulset airflow-scheduler-default
50-
statefulset.apps/airflow-scheduler-default restarted
51+
❯ kubectl rollout restart statefulset myairflow-scheduler-default
52+
statefulset.apps/myairflow-scheduler-default restarted
5153
----
5254

53-
Sometimes you want to restart all Pods of stack and not just individual roles. This can be achieved in a similar manner by using labels instead of StatefulSet names. Continuing with the example above, to restart all Airflow Pods you would have to run:
55+
Sometimes you want to restart all Pods of stacklet and not just individual roles. This can be achieved in a similar manner by using labels instead of StatefulSet names. Continuing with the example above, to restart all Airflow Pods you would have to run:
5456

5557
[source,shell]
5658
----
57-
❯ kubectl rollout restart statefulset --selector app.kubernetes.io/instance=airflow
59+
❯ kubectl rollout restart statefulset --selector app.kubernetes.io/instance=myairflow
5860
----
5961

6062
To wait for all Pods to be running again you run:
6163

6264
[source,shell]
6365
----
64-
❯ kubectl rollout status statefulset --selector app.kubernetes.io/instance=airflow
66+
❯ kubectl rollout status statefulset --selector app.kubernetes.io/instance=myairflow
6567
----
6668

67-
Here we used the label `app.kubernetes.io/instance=airflow` to select all Pods that belong to a specific Airflow stacklet. This label is created by the operator and `airflow` is the name of the Airflow stacklet as specified in the custom resource. You can add more labels to make finer grained restarts.
68-
69-
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.
69+
Here we used the label `app.kubernetes.io/instance=myairflow` to select all Pods that belong to a specific Airflow stacklet. This label is created by the operator and `myairflow` is the name of the Airflow stacklet as specified in the custom resource. You can add more labels to make finer grained restarts.
7070

7171
== Automatic Restarts
7272

0 commit comments

Comments
 (0)