You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/concepts/pages/operations/cluster_operations.adoc
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -28,45 +28,45 @@ Sometimes it is necessary to restart services deployed in Kubernetes. A service
28
28
29
29
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.
30
30
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:
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:
❯ kubectl rollout status statefulset --selector app.kubernetes.io/instance=airflow
66
+
❯ kubectl rollout status statefulset --selector app.kubernetes.io/instance=myairflow
65
67
----
66
68
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.
0 commit comments