diff --git a/deploy/kube-deploy.sh b/deploy/kube-deploy.sh new file mode 100755 index 0000000..75d2524 --- /dev/null +++ b/deploy/kube-deploy.sh @@ -0,0 +1,8 @@ +# Below we start the master pod and service first. +# Then, we start slaves, which will connect through the +# slave proxy. +kubectl create -f ./spark-master-pod.yaml +kubectl create -f ./spark-master-service.json +kubectl create -f ./spark-slave-controller.json +kubectl create -f ./spark-slave-service.json +kubectl get pods,services diff --git a/deploy/spark-slave-controller.json b/deploy/spark-slave-controller.json index a1e288b..c36f42f 100644 --- a/deploy/spark-slave-controller.json +++ b/deploy/spark-slave-controller.json @@ -3,8 +3,8 @@ "kind": "ReplicationController", "apiVersion": "v1beta1", "desiredState": { - "replicas": 2, - "replicaSelector": {"name": "redisslave"}, + "replicas": 10, + "replicaSelector": {"name": "spark-slave"}, "podTemplate": { "desiredState": { "manifest": { @@ -12,17 +12,18 @@ "id": "sparkSlaveController", "containers": [{ "name": "spark-slave", - "image": "jayunit100/spark2", + "image": "jayunit100/spark4", "cpu": 200, + "command":["/bin/bash","/opt/run.sh","slave"], "ports": [{ "containerPort": 6379, "hostPort": 6380 }] }] } }, "labels": { - "name": "sparkslave", + "name": "spark-slave", "uses": "spark-master" } } }, - "labels": {"name": "sparkslave"} + "labels": {"name": "spark-slave"} }