apiVersion: v1
kind: ReplicationController
metadata:
  name: spark-worker-2-0-1
  labels:
    app: spark
    role: worker
    version: 2.0.1
spec:
  replicas: 1
  selector:
    name: spark-worker-2-0-1
  template:
    metadata:
      labels:
        name: spark-worker-2-0-1
    spec:
      containers:
      - name: spark-worker-2-0-1
        image: fluxcapacitor/apachespark-worker-2.0.1
        imagePullPolicy: "Never"
        env:
        - name: GET_HOSTS_FROM
          value: env
        - name: SPARK_WORKER_CORES
          value: "4"
        - name: SPARK_WORKER_MEMORY
          value: 4g
        - name: SPARK_MASTER
          value: spark://spark-master-2-0-1:7077
        ports:
        - containerPort: 6061
      nodeSelector:
        training: "true"
