Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]:DaemonSet采集容器文件的最小化挂载配置 #1800

Open
scheshan opened this issue Oct 11, 2024 · 0 comments
Open

[QUESTION]:DaemonSet采集容器文件的最小化挂载配置 #1800

scheshan opened this issue Oct 11, 2024 · 0 comments
Labels
question Further information is requested

Comments

@scheshan
Copy link

按照文档,要采集容器文件,部署DaemonSet的时候还要挂载根目录。

        - hostPath:
            path: /
            type: Directory
          name: root

这个路径太大了,我们准备按需要挂载。我们CRI是containerd,我把rootfs、挂载卷、标准输出的几个路径都单独挂载了

        volumeMounts:
            - mountPath: /var/run                       # for container runtime socket
              name: run
            - mountPath: /logtail_host/home/containerd                  # for log access on the node
              mountPropagation: HostToContainer
              name: containerd
              readOnly: true
            - mountPath: /logtail_host/home/kubelet                  # for log access on the node
              mountPropagation: HostToContainer
              name: kubelet
              readOnly: true
            - mountPath: /logtail_host/var/log                  # for log access on the node
              mountPropagation: HostToContainer
              name: varlog
              readOnly: true
            - mountPath: /home/ilogtail/ilogtail-2.0.4/checkpoint # for checkpoint between container restart
              name: checkpoint
    volumes:
        - hostPath:
            path: /var/run
            type: Directory
          name: run
        - hostPath:
            path: /home/containerd/
            type: Directory
          name: containerd
        - hostPath:
            path: /home/kubelet/
            type: Directory
          name: kubelet
        - hostPath:
            path: /var/log/
            type: Directory
          name: varlog
        - hostPath:
            path: /etc/ilogtail/checkpoint
            type: DirectoryOrCreate
          name: checkpoint

这样的效果是,如果容器日志文件没有挂载,就采集不到了。还需要啥额外的文件要挂载嘛

@scheshan scheshan added the question Further information is requested label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant