0

我有一个 Kubernetes 集群,我正在尝试运行 fluentd 以将日志发送到 Loggly 以供查看。我有一个问题,我知道我的令牌是正确的,因为它之前在另一个集群上工作。

下面是我的 manifet.yaml 文件,我没有要共享的日志,因为 pod 没有记录任何内容。

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fluentd-es-v1.20
  namespace: kube-system
  labels:
    k8s-app: fluentd-loggly
    kubernetes.io/cluster-service: "true"
    version: v1.20
spec:
  selector:
    matchLabels:
      k8s-app: fluentd-loggly
  template:
    metadata:
      labels:
        k8s-app: fluentd-loggly
        kubernetes.io/cluster-service: "true"
        version: v1.20
    spec:
      containers:
      - name: fluentd-loggly
        image: garland/kubernetes-fluentd-loggly:1.0
        command:
          - '/bin/sh'
          - '-c'
          - '/usr/sbin/td-agent 2>&1 >> /var/log/fluentd.log'
        env:
          - name: LOGGLY_URL
            value: "https://logs-01.loggly.com/inputs/<token>/tag/<tag>"
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
        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

编辑 1

请求的日志

2021-06-21 16:33:43 +0000 [warn]: pattern not match: "2021-06-21T16:33:43.548145693Z stdout F 2021-06-21 16:33:43 UTC | CORE | ERROR | (pkg/autodiscovery/config_poller.go:123 in collect) | Unable to collect configurations from provider docker: temporary failure in dockerutil, will retry later: try delay not elapsed yet"

这一遍又一遍地重复,日志中没有其他内容。

4

0 回答 0