Comments (8)
是不是 pod 一定得制定 volumes,同时必须value 类型是 emptyDir 和 hostPath 这两类的其中一种才能采集到 容器内的日志。
如果 pod 完全不配置 volumes: 这种pod容器内的日志可以采集到吗
volumes:
- emptyDir: {}
name: log
volumes:
- hostPath:
path: /data/log
type: ""
from loggie.
源码看起来,pod如果没有配置 volumes 就无法使用采集容器内的日志的。是这样吗? 是受限的的pod,需要pod 有配置 volumes 才可以采集是吧?
from loggie.
函数看球来也是一定要判断,empty和 hostpath才可以
from loggie.
比如下面的测试 demo pod,什么volume 都没有配置,能不能使用 loggie 采集到 容器内的日志。
apiVersion: apps/v1
kind: Deployment
metadata:
name: ebiz-deployment
labels:
app: ebiz-app
spec:
replicas: 3
selector:
matchLabels:
app: ebiz-app
template:
metadata:
labels:
app: ebiz-app
spec:
containers:
- name: ebiz
image: docker.io/xdatcloud/demo:latest
from loggie.
pod没有挂载volume的情况下,我们内部版本支持从docker rootfs采集日志,但是需要挂载docker sock,下个小版本,我们考虑使用更好的方案去支持一下。
from loggie.
另外我们有一些用pvc 挂在的pod,这种日志能采集得了吗?
volumeMounts:
- mountPath: /cassandra_data
name: cassandra-data
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: fast
name: cassandra-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: fast
volumeMode: Filesystem
status:
phase: Pending
from loggie.
👍,期待做好。
这个容器内日志采集,确实是一个非常**特色的场景,**内现在完全不按 12 因素来执行,这个采集如果能统一有个解决方案就好了。
from loggie.
Fixed by: #208
from loggie.
Related Issues (20)
- support setFloat/setInt/setBool
- 使用 Loggie 采集到 Loki 的日志不连续,一段时间有一段时间没有数据 HOT 3
- set maxprocs error: invalid format for CGroupSubsys:"12:freezer:/kubepods-pod... HOT 1
- transformer regex => jsonEncode action execute error: failed to execute action jsonEncode: type assert to map[string]interface{} failed HOT 1
- Sink有计划支持 OpenObserve 吗? HOT 2
- 一个pod内采集容器日志出现重复! HOT 2
- bug: the deleted file was not released as expected HOT 1
- Support transformer replace action
- 关于 logconfig 配置内的排除容器正则 excludeContainerPatterns 参数字段,是否支持使用反向正则语句? HOT 2
- what is difference with vector?
- windows版本的 可执行文件
- logconfig 在节点不更新
- Loggie传输到ES的时候支持配置别名么? HOT 1
- encoding
- 应用pod重启后,loggie无法采集 HOT 2
- source file stop failed HOT 1
- 关于日志告警的问题 HOT 3
- go test -race检测到DATA RACE
- branch main pkg/source/file/watch.go:321, your have drop the function of Pre-allocation offset
- 可以支持采集非 K8S 容器的 stdout 日志吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loggie.