apiVersion: v1
kind: ReplicationController
metadata:
  name: logstash
  namespace: default
  labels:
    component: elk
    role: logstash
spec:
  replicas: 1
  selector:
    component: elk
    role: logstash
  template:
    metadata:
      labels:
        component: elk
        role: logstash
    spec:
      serviceAccount: elk
      containers:
      - name: logstash
        image: pires/logstash
        env:
        - name: KUBERNETES_TRUST_CERT
          value: "true"
        ports:
        - containerPort: 5043
          name: lumberjack
          protocol: TCP
        volumeMounts:
        - mountPath: /certs
          name: certs
      volumes:
      - emptyDir:
          medium: ""
        name: "storage"
      - hostPath:
          path: "/tmp"
        name: "certs"