text stringlengths 0 59.1k |
|---|
kubectl create -f examples/staging/spark -n spark-cluster |
``` |
After it's setup: |
```console |
kubectl get pods -n spark-cluster # Make sure everything is running |
kubectl get svc -o wide -n spark-cluster # Get the Loadbalancer endpoints for spark-ui-proxy and zeppelin |
``` |
At which point the Master UI and Zeppelin will be available at the URLs under the `EXTERNAL-IP` field. |
You can also interact with the Spark cluster using the traditional `spark-shell` / |
`spark-submit` / `pyspark` commands by using `kubectl exec` against the |
`zeppelin-controller` pod. |
If your Kubernetes cluster does not have a Loadbalancer integration, use `kubectl proxy` and `kubectl port-forward` to access the Spark UI and Zeppelin. |
For Spark UI: |
```console |
kubectl proxy --port=8001 |
``` |
Then visit [http://localhost:8001/api/v1/proxy/namespaces/spark-cluster/services/spark-ui-proxy/](http://localhost:8001/api/v1/proxy/namespaces/spark-cluster/services/spark-ui-proxy/). |
For Zeppelin: |
```console |
kubectl port-forward zeppelin-controller-abc123 8080:8080 & |
``` |
Then visit [http://localhost:8080/](http://localhost:8080/). |
## Known Issues With Spark |
* This provides a Spark configuration that is restricted to the cluster network, |
meaning the Spark master is only available as a cluster service. If you need |
to submit jobs using external client other than Zeppelin or `spark-submit` on |
the `zeppelin` pod, you will need to provide a way for your clients to get to |
the |
[`examples/staging/spark/spark-master-service.yaml`](spark-master-service.yaml). See |
[Services](https://kubernetes.io/docs/concepts/services-networking/service/) for more information. |
## Known Issues With Zeppelin |
* The Zeppelin pod is large, so it may take a while to pull depending on your |
network. The size of the Zeppelin pod is something we're working on, see issue #17231. |
* Zeppelin may take some time (about a minute) on this pipeline the first time |
you run it. It seems to take considerable time to load. |
* On GKE, `kubectl port-forward` may not be stable over long periods of time. If |
you see Zeppelin go into `Disconnected` state (there will be a red dot on the |
top right as well), the `port-forward` probably failed and needs to be |
restarted. See #12179. |
<|endoftext|> |
# source: k8s_examples/_archived/spark/spark-ui-proxy-controller.yaml type: yaml |
kind: ReplicationController |
apiVersion: v1 |
metadata: |
name: spark-ui-proxy-controller |
spec: |
replicas: 1 |
selector: |
component: spark-ui-proxy |
template: |
metadata: |
labels: |
component: spark-ui-proxy |
spec: |
containers: |
- name: spark-ui-proxy |
image: elsonrodriguez/spark-ui-proxy:1.0 |
ports: |
- containerPort: 80 |
resources: |
requests: |
cpu: 100m |
args: |
- spark-master:8080 |
livenessProbe: |
httpGet: |
path: / |
port: 80 |
initialDelaySeconds: 120 |
timeoutSeconds: 5 |
<|endoftext|> |
# source: k8s_examples/_archived/spark/namespace-spark-cluster.yaml type: yaml |
apiVersion: v1 |
kind: Namespace |
metadata: |
name: "spark-cluster" |
labels: |
name: "spark-cluster" |
<|endoftext|> |
# source: k8s_examples/_archived/spark/spark-master-service.yaml type: yaml |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.