apiVersion: v1
kind: Pod
metadata:
  name: fluentd-elasticsearch
  namespace: kube-system
  labels:
    k8s-app: fluentd-logging
spec:
#  imagePullSecrets:
#  - name: aliregistrykey  
  dnsPolicy: "ClusterFirst"
  containers:
  - name: fluentd-elasticsearch
    image: fabric8/fluentd-kubernetes
#    image: hub.docker.vpclub.cn/vpclub_containers/fluentd-elasticsearch:1.19
    resources:
      limits:
        memory: 200Mi
      requests:
        cpu: 100m
        memory: 200Mi
    env:
    - name: ES_HOST
      value: http://192.168.3.143
#      value: http://elasticsearch.kube-system.svc
    - name: ES_PORT
      value: "9200"    
    - name: TZ
      value: Asia/Shanghai
    volumeMounts:
    - name: varlog
      mountPath: /var/log
    - name: varlibdockercontainers
      mountPath: /var/lib/docker/containers
      readOnly: true
  terminationGracePeriodSeconds: 30
  volumes:
  - name: varlog
    hostPath:
      path: /var/log
  - name: varlibdockercontainers
    hostPath:
      path: /var/lib/docker/containers

