apiVersion: v1
kind: ReplicationController
metadata:
  name: kibana
  labels:
    component: elk
    role: kibana
spec:
  replicas: 1
  selector:
    component: elk
    role: kibana
  template:
    metadata:
      labels:
        component: elk
        role: kibana
    spec:
      serviceAccount: elk
      containers:
      - name: kibana
        image: peterjakobs/kibana:v6.2.3-arm
        env:
        - name: KIBANA_ES_URL
          value: "http://elasticsearch:9200"
        - name: KUBERNETES_TRUST_CERT
          value: "true"
        - name: CLUSTER_NAME
          value: myesdb
        - name: SERVER_BASEPATH
          value: kibana
        ports:
        - containerPort: 5601
          name: http
          protocol: TCP
        volumeMounts:
        - name: config
          mountPath: /opt/kibana/config
        ##- name: logtrail-config
          #mountPath: /usr/share/kibana/plugins/logtrail
          ##mountPath: /opt/kibana/plugins/logtrail/logtrail.json
          ##subPath: logtrail.json
      volumes:
      - name : config
        configMap:
          name: kibana-config
          items:
          - key: kibana.yml
            path: kibana.yml
      - name : logtrail-config
        configMap:
          name: kibana-config
          items:          
          - key: logtrail.json
            path: logtrail.json

