apiVersion: apps/v1
kind: Deployment
metadata:
  name: kibana
  namespace: elk
  labels:
    app: kibana
spec:
  replicas: 1
  selector:
    matchLabels:
     app: kibana
  template:
    metadata:
      labels:
        app: kibana
    spec:
      containers:
      - name: kibana
        image: docker.elastic.co/kibana/kibana-oss:6.3.2
        env:
        - name: CLUSTER_NAME
          value: myesdb
        - name: SERVER_BASEPATH
          value: /api/v1/namespaces/default/services/kibana:http/proxy
        resources:
          limits:
            cpu: 1000m
          requests:
            cpu: 100m
        ports:
        - containerPort: 5601
          name: http
        readinessProbe:
          httpGet:
            path: /api/status
            port: http
          initialDelaySeconds: 20
          timeoutSeconds: 5
        volumeMounts:
          - name: config
            mountPath: /usr/share/kibana/config
            readOnly: true
      volumes:
        - name: config
          configMap:
            name: kibana-config
