Docker-desktop k8s Setup

k8s starting

Jacob Xie published on
2 min, 227 words

Categories: Doc

Tags: k8s

Docker desktop setup Kubernetes as a dev environment.

Start up

Starting up from this repo, we use image mirrors without any proxy setup.

Use cases


Docker package

Pre-pull image in case of k8s pulling timeout:

docker pull
** Please be patient while the chart is being deployed **

1. Get the Spark master WebUI URL by running these commands:

  kubectl port-forward --namespace default svc/my-spark-master-svc 80:80
  echo "Visit to use your application"

2. Submit an application to the cluster:

  To submit an application to the cluster the spark-submit script must be used. That script can be
  obtained at Also you can use kubectl run.

  export EXAMPLE_JAR=$(kubectl exec -ti --namespace default my-spark-worker-0 -- find examples/jars/ -name 'spark-example*\.jar' | tr -d '\r')

  kubectl exec -ti --namespace default my-spark-worker-0 -- spark-submit --master spark://my-spark-master-svc:7077 \
    --class org.apache.spark.examples.SparkPi \

** IMPORTANT: When submit an application from outside the cluster service type should be set to the NodePort or LoadBalancer. **

** IMPORTANT: When submit an application the --master parameter should be set to the service IP, if not, the application will not resolve the master. **