【发布时间】:2018-04-19 13:38:08
【问题描述】:
我已经用谷歌搜索了一整天,似乎我不知道要谷歌什么;)
所以我想做的是增强在谷歌云中运行的容器的日志记录。 fluentd 正在收集日志。
我的特定 yaml 如下所示:
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- env:
- name: TEST
value: "test123"
name: nginx
image: nginx:1.8
ports:
- containerPort: 80
如您所见,我有一个名为“TEST”的环境变量,其值为“test123”。
我现在想要做的是,fluentd 将这个键/值对附加到每个日志行......这很难还是我什至无法做到这一点?
任何帮助或链接将不胜感激。
提前致谢:)
【问题讨论】:
标签: logging kubernetes google-cloud-platform fluentd google-kubernetes-engine