Skip to content

Commit c60e3af

Browse files
committed
[SPARK-53853] Add Example section in operators.md
1 parent aad9ca1 commit c60e3af

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/operations.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,33 @@ 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+
$ 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
167+
```
168+
169+
Check installation.
170+
171+
```
172+
$ helm list -A
173+
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
174+
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
175+
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
176+
```
177+
178+
Launch `pi.yaml` at `us-west-1` and `us-west-2` namespaces.
179+
180+
```
181+
$ kubectl apply -f https://apache.github.io/spark-kubernetes-operator/pi.yaml -n us-west-1
182+
$ kubectl apply -f https://apache.github.io/spark-kubernetes-operator/pi.yaml -n us-west-2
183+
$ kubectl get sparkapp -A
184+
NAMESPACE NAME CURRENT STATE AGE
185+
us-west-1 pi RunningHealthy 8s
186+
us-west-2 pi RunningHealthy 3s
187+
```

0 commit comments

Comments
 (0)