We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
EFK文章部分,配置有问题。默认如下配置是没权限读取的
/var/log/containers下面的日志文件是软连接,挂载到容器里面根本读不到。
原始文件是在/var/lib/docker/containers下面。 还需要挂载这个目录.
##########原始内容############ containers: - name: fluentd image: quay.io/fluentd_elasticsearch/fluentd:v3.4.0 volumeMounts: - name: fluentconfig mountPath: /etc/fluent/config.d - name: varlog mountPath: /var/log volumes: - name: fluentconfig configMap: name: fluentd-conf - name: varlog hostPath: path: /var/log
##############修改后############## containers: - name: fluentd image: quay.io/fluentd_elasticsearch/fluentd:v3.4.0 volumeMounts: - name: fluentconfig mountPath: /etc/fluent/config.d - name: varlog mountPath: /var/log - name: containerlog mountPath: /var/lib/docker/containers volumes: - name: fluentconfig configMap: name: fluentd-conf - name: varlog hostPath: path: /var/log - name: containerlog hostPath: path: /var/lib/docker/containers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
EFK文章部分,配置有问题。默认如下配置是没权限读取的
/var/log/containers下面的日志文件是软连接,挂载到容器里面根本读不到。
原始文件是在/var/lib/docker/containers下面。 还需要挂载这个目录.
##########原始内容############
containers:
- name: fluentd
image: quay.io/fluentd_elasticsearch/fluentd:v3.4.0
volumeMounts:
- name: fluentconfig
mountPath: /etc/fluent/config.d
- name: varlog
mountPath: /var/log
volumes:
- name: fluentconfig
configMap:
name: fluentd-conf
- name: varlog
hostPath:
path: /var/log
##############修改后##############
containers:
- name: fluentd
image: quay.io/fluentd_elasticsearch/fluentd:v3.4.0
volumeMounts:
- name: fluentconfig
mountPath: /etc/fluent/config.d
- name: varlog
mountPath: /var/log
- name: containerlog
mountPath: /var/lib/docker/containers
volumes:
- name: fluentconfig
configMap:
name: fluentd-conf
- name: varlog
hostPath:
path: /var/log
- name: containerlog
hostPath:
path: /var/lib/docker/containers
The text was updated successfully, but these errors were encountered: