apiVersion: v1
kind: Pod
metadata:
  name: fluentd-logging
  namespace: kube-system
  labels:
    k8s-app: fluentd-logging
spec:
  imagePullSecrets:
  - name: aliregistrykey  
  dnsPolicy: "ClusterFirst"
  containers:
  - name: fluentd-logging
    image: hub.docker.vpclub.cn/vpclub_containers/fluentd-elasticsearch:1.21
    resources:
      limits:
        memory: 200Mi
      requests:
        cpu: 100m
        memory: 200Mi
    env:
    - name: "ELASTICSEARCH_URL"
      value: "${ELASTICSEARCH_HOST}"
    - 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

