Skip to content

Commit 04bc6b9

Browse files
authored
Merge pull request #449 from alghe-global/spark-fixes
Remove "$" from commands and clarify context for spark example
2 parents 13cbf0b + d65dfd1 commit 04bc6b9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

staging/spark/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ Optionally, your Kubernetes cluster should be configured with a Loadbalancer int
3030

3131
## Step One: Create namespace
3232

33+
Create the namespace by executing the following command using `kubectl`:
34+
3335
```sh
34-
$ kubectl create -f examples/staging/spark/namespace-spark-cluster.yaml
36+
kubectl create -f examples/staging/spark/namespace-spark-cluster.yaml
3537
```
3638

3739
Now list all namespaces:
@@ -43,14 +45,14 @@ default <none> Active
4345
spark-cluster name=spark-cluster Active
4446
```
4547

46-
To configure kubectl to work with our namespace, we will create a new context using our current context as a base:
48+
To configure kubectl to work with our namespace, we will create a new context using our current context as a base with the following commands:
4749

4850
```sh
49-
$ CURRENT_CONTEXT=$(kubectl config view -o jsonpath='{.current-context}')
50-
$ USER_NAME=$(kubectl config view -o jsonpath='{.contexts[?(@.name == "'"${CURRENT_CONTEXT}"'")].context.user}')
51-
$ CLUSTER_NAME=$(kubectl config view -o jsonpath='{.contexts[?(@.name == "'"${CURRENT_CONTEXT}"'")].context.cluster}')
52-
$ kubectl config set-context spark --namespace=spark-cluster --cluster=${CLUSTER_NAME} --user=${USER_NAME}
53-
$ kubectl config use-context spark
51+
CURRENT_CONTEXT=$(kubectl config view -o jsonpath='{.current-context}')
52+
USER_NAME=$(kubectl config view -o jsonpath='{.contexts[?(@.name == "'"${CURRENT_CONTEXT}"'")].context.user}')
53+
CLUSTER_NAME=$(kubectl config view -o jsonpath='{.contexts[?(@.name == "'"${CURRENT_CONTEXT}"'")].context.cluster}')
54+
kubectl config set-context spark --namespace=spark-cluster --cluster=${CLUSTER_NAME} --user=${USER_NAME}
55+
kubectl config use-context spark
5456
```
5557

5658
## Step Two: Start your Master service
@@ -279,7 +281,7 @@ If your Kubernetes cluster does not have a Loadbalancer integration, then we wil
279281
Take the Zeppelin pod from before and port-forward the WebUI port:
280282

281283
```console
282-
$ kubectl port-forward zeppelin-controller-ja09s 8080:8080
284+
kubectl port-forward zeppelin-controller-ja09s 8080:8080
283285
```
284286

285287
This forwards `localhost` 8080 to container port 8080. You can then find

0 commit comments

Comments
 (0)