wir*_*tsi 3 google-compute-engine kubernetes stackdriver
我有一个最近在 GCE 上运行的 kubernetes 集群。我正在尝试让我的应用程序登录到 Cloud Logging / Stackdriver。
我可以在那里看到所有 kubernetes 集群日志,但没有容器输出出现。
因此,当我按照本指南操作时:http://kubernetes.io/docs/getting-started-guides/logging/,我可以看到 Pod 的输出
kubectl logs counter
2163: Wed Aug 31 15:02:52 UTC 2016
Run Code Online (Sandbox Code Playgroud)
这永远不会进入日志记录界面
fluidd-cloud-logging pod 不提供日志输出
kubectl logs --namespace=kube-system fluentd-cloud-logging-staging-minion-group-20hk
Run Code Online (Sandbox Code Playgroud)
/var/log/google-fluidd/google-fluidd.log 文件看起来很高兴
...
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/containers/node-problem-detector-v0.1-hgtcr_kube-system_POD-07e5b134c9f8ff48f73f1df41473a84a07738ac750840f09938d604694c4bd6e.log
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/containers/rails-2607986313-s7r5e_default_POD-9f1dd02f23de552a40297f761d09c03b50e5a2cd9789ef498139d24602d9847e.log
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/salt/minion
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/startupscript.log
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/docker.log
2016-08-31 14:07:16 +0000 [info]: following tail of /var/log/kubelet.log
2016-08-31 14:07:22 +0000 [info]: Successfully sent to Google Cloud Logging API.
2016-08-31 14:07:22 +0000 [info]: Successfully sent to Google Cloud Logging API.
Run Code Online (Sandbox Code Playgroud)
Kubernetes 版本是
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.5", GitCommit:"b0deb2eb8f4037421077f77cb163dbb4c0a2a9f5", GitTreeState:"clean", BuildDate:"2016-08-11T20:29:08Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.5", GitCommit:"b0deb2eb8f4037421077f77cb163dbb4c0a2a9f5", GitTreeState:"clean", BuildDate:"2016-08-11T20:21:58Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Run Code Online (Sandbox Code Playgroud)
集群启动于
export KUBE_GCE_ZONE=europe-west1-d
export NODE_SIZE=n1-standard-2
export NUM_NODES=2
export KUBE_GCE_INSTANCE_PREFIX=staging
export ENABLE_CLUSTER_AUTOSCALER=true
export KUBE_ENABLE_CLUSTER_MONITORING=true
export KUBE_ENABLE_CLUSTER_MONITORING=google
Run Code Online (Sandbox Code Playgroud)
有什么想法我可能做错了什么吗?据我了解,这应该是开箱即用的,对吧?
有点遥远,但是您启用了日志记录 API 吗?
“您可以从此处的开发人员控制台执行此操作。尝试转到那里,单击启用 API 按钮,然后查看错误是否继续出现。”
https://github.com/kubernetes/kubernetes/issues/20516
Google Cloud Logging + google-fluidd 删除消息
| 归档时间: |
|
| 查看次数: |
4012 次 |
| 最近记录: |