Skip to content

Commit 9423208

Browse files
committed
[SPARK-53853] Add Example section in operators.md
### What changes were proposed in this pull request? This PR aims to add `Example` section in `operators.md`. ### Why are the changes needed? To illustrate how to install and maintain multiple operators based on the workloads. ### Does this PR introduce _any_ user-facing change? No. This is a documentation addition. ### How was this patch tested? Manual review. - https://github.com/dongjoon-hyun/spark-kubernetes-operator/blob/SPARK-53853/docs/operations.md#example - **OUTLINE** <img width="311" height="279" alt="Screenshot 2025-10-08 at 22 13 14" src="https://github.com/user-attachments/assets/f7c5b5d5-c99c-4db2-b10d-8a959205dca2" /> - **SECTION** <img width="1029" height="633" alt="Screenshot 2025-10-08 at 22 23 44" src="https://github.com/user-attachments/assets/aac7f785-7c8d-48fa-9775-9776216529b5" /> ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#380 from dongjoon-hyun/SPARK-53853. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 4563830 commit 9423208

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/operations.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,38 @@ metadata:
155155
labels:
156156
"spark.operator/sentinel": "true"
157157
```
158+
159+
## Example
160+
161+
Install HelmChart at `us-west-1` and `us-west-2` namespaces.
162+
163+
```bash
164+
helm install us-west-1 spark/spark-kubernetes-operator --create-namespace --namespace us-west-1 --set operatorRbac.clusterRole.name=spark-operator-clusterrole-us-west-1 --set operatorRbac.clusterRoleBinding.name=spark-operator-clusterrolebinding-us-west-1 --set workloadResources.clusterRole.name=spark-workload-clusterrole-us-west-1
165+
```
166+
167+
```bash
168+
helm install us-west-2 spark/spark-kubernetes-operator --create-namespace --namespace us-west-2 --set operatorRbac.clusterRole.name=spark-operator-clusterrole-us-west-2 --set operatorRbac.clusterRoleBinding.name=spark-operator-clusterrolebinding-us-west-2 --set workloadResources.clusterRole.name=spark-workload-clusterrole-us-west-2
169+
```
170+
171+
Check installation.
172+
173+
```bash
174+
$ helm list -A
175+
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
176+
us-west-1 us-west-1 1 2025-10-08 22:04:45.530136 -0700 PDT deployed spark-kubernetes-operator-1.3.0 0.5.0
177+
us-west-2 us-west-2 1 2025-10-08 22:04:48.747434 -0700 PDT deployed spark-kubernetes-operator-1.3.0 0.5.0
178+
```
179+
180+
Launch `pi.yaml` at `us-west-1` and `us-west-2` namespaces.
181+
182+
```bash
183+
kubectl apply -f https://apache.github.io/spark-kubernetes-operator/pi.yaml -n us-west-1
184+
kubectl apply -f https://apache.github.io/spark-kubernetes-operator/pi.yaml -n us-west-2
185+
```
186+
187+
```bash
188+
$ kubectl get sparkapp -A
189+
NAMESPACE NAME CURRENT STATE AGE
190+
us-west-1 pi RunningHealthy 8s
191+
us-west-2 pi RunningHealthy 3s
192+
```

0 commit comments

Comments
 (0)