apiVersion: v1
kind: ReplicationController
metadata:
  name: elasticsearch
  namespace: default
  labels:
    component: elk
    role: elasticsearch
spec:
  replicas: 1
  selector:
    component: elk
    role: elasticsearch
  template:
    metadata:
      labels:
        component: elk
        role: elasticsearch
    spec:
      serviceAccount: elk
      containers:
      - name: elasticsearch
        image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
        env:
        - name: ES_JAVA_OPTS
          value: "-Xms4g -Xmx8g"
        - name: discovery.type
          value: "single-node" 
        ports:
        - containerPort: 9200
          name: one
          protocol: TCP
        - containerPort: 9300
          name: two
          protocol: TCP
