我有一个在GCE上运行的最近的kubernetes集群。我正在尝试让我的应用程序登录到Cloud Logging / Stackdriver。
我可以看到所有kubernetes集群日志,但没有容器输出实现。
因此,当我按照本指南:http://kubernetes.io/docs/getting-started-guides/logging/时,我可以看到广告连播的输出
kubectl logs counter
2163: Wed Aug 31 15:02:52 UTC 2016
这永远不会进入日志记录界面
流利的云记录窗格不提供记录输出
kubectl logs --namespace=kube-system fluentd-cloud-logging-staging-minion-group-20hk
/var/log/google-fluentd/google-fluentd.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.
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"}
群集以
启动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
任何想法我可能做错了什么?根据我的理解,这应该是开箱即用的,对吗?
答案 0 :(得分:1)
Bit of a long shot, but have you enabled the logging API?
"You can do so from the Developers Console, here. Try going there, clicking the Enable API button, and seeing whether the errors keep coming."
答案 1 :(得分:1)
好的,这很愚蠢:
如果您在GCE上运行kubernetes群集,容器应用程序日志将显示在Google容器引擎日志中。
从不打扰那里检查因为,好吧,我没有使用容器引擎。