Skip to content

Commit

Permalink
K8 deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 21, 2015
1 parent d6ecea7 commit 51edd26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions deploy/kube-deploy.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions deploy/spark-slave-controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
"kind": "ReplicationController",
"apiVersion": "v1beta1",
"desiredState": {
"replicas": 2,
"replicaSelector": {"name": "redisslave"},
"replicas": 10,
"replicaSelector": {"name": "spark-slave"},
"podTemplate": {
"desiredState": {
"manifest": {
"version": "v1beta1",
"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"}
}

0 comments on commit 51edd26

Please sign in to comment.