Skip to content

[QUESTION]:采集容器日志,ilogtail没有输出 #1177

Answered by nsdsb123
nsdsb123 asked this question in Help
Discussion options

You must be logged in to vote

已经解决了,我测试的时候改了一下官方的例子的yaml文件,所以没成功采集,后面直接用官方的例子就成功了,但是不知道具体是哪些改动导致有问题,下面是我一开始错误的yaml文件,还有个问题想请教一下,用回官方的模板可以采集,但是不太清楚他这个采集的逻辑,我采集这个label是有两个pod的,分别在不同的节点上,然后我得ilogtail部署在6个节点上,但是其中只有3个节点是能正常采集的。

apiVersion: apps/v1
kind: deployment
metadata:
name: ilogtail-ds
namespace: backend
labels:
k8s-app: logtail-ds
spec:
replicas: 1
selector:
matchLabels:
k8s-app: logtail-ds
template:
metadata:
labels:
k8s-app: logtail-ds
spec:
containers:
- name: logtail
env:
- name: ALIYUN_LOG_ENV_TAGS # add log tags from env
value: node_name|node_ip
- name: node_name
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: node_ip
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
image: >-

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by messixukejia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #1171 on October 11, 2023 01:16.