# k8s_examples_es-master-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: es-master
  labels:
    component: elasticsearch
    role: master
spec:
  replicas: 1
  template:
    metadata:
      labels:
        component: elasticsearch
        role: master
    spec:
      serviceAccount: elasticsearch
      containers:
      - name: es-master
        securityContext:
          capabilities:
            add:
              - IPC_LOCK
        image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4
        env:
        - name: KUBERNETES_CA_CERTIFICATE_FILE
          value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: "CLUSTER_NAME"
          value: "myesdb"
        - name: NODE_MASTER
          value: "true"
        - name: NODE_DATA
          value: "false"
        - name: HTTP_ENABLE
          value: "false"
        ports:
        - containerPort: 9300
          name: transport
          protocol: TCP
        volumeMounts:
        - mountPath: /data
          name: storage
      volumes:
      - name: storage
        emptyDir: {}