apiVersion: v1
kind: ReplicationController
metadata:
  name: kibana
  #namespace: default
  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: kibana:5.2.2 
        #gcr.io/docker-161916/kibana:5.2.2.0
        #docker.elastic.co/kibana/kibana:5.2.2
        #docker.elastic.co/kibana/kibana:5.2.2
        resources:
          # keep request = limit to keep this container in guaranteed class
          limits:
            cpu: 100m
          requests:
            cpu: 100m
        env:
          - name: ELASTICSEARCH_URL
            value: "http://elasticsearch:9200"
          #- name: XPACK_MONITORING_ENABLED
          #  value: "false"
          #- name: XPACK_SECURITY_ENABLED
          #  value: "false"
          #- name: "KIBANA_BASE_URL"
          #  value: "/api/v1/proxy/namespaces/default/services/kibana"
        ports:
        - containerPort: 5601
          name: ui
          protocol: TCP
