【发布时间】:2016-02-02 23:44:23
【问题描述】:
我有一个相当小的(1-2 个节点)kubernetes 集群在 GKE 中运行,运行 ±40 个 Pod。手头的问题是它没有正确登录到 GCE 控制台。我看到很多来自 fluentd 容器的消息,格式如下:
$ kubectl logs fluentd-cloud-logging-gke-xxxxxxxx-node-xxxx
2016-02-02 23:30:09 +0000 [warn]: Dropping 10 log message(s) error_class="Google::APIClient::ClientError" error="Project has not enabled the API. Please use Google Developers Console to activate the 'logging' API for your project."
2016-02-02 23:30:09 +0000 [warn]: Dropping 1 log message(s) error_class="Google::APIClient::ClientError" error="Project has not enabled the API. Please use Google Developers Console to activate the 'logging' API for your project."
2016-02-02 23:30:09 +0000 [warn]: Dropping 3 log message(s) error_class="Google::APIClient::ClientError" error="Project has not enabled the API. Please use Google Developers Console to activate the 'logging' API for your project."
2016-02-02 23:30:09 +0000 [warn]: Dropping 41 log message(s) error_class="Google::APIClient::ClientError" error="Project has not enabled the API. Please use Google Developers Console to activate the 'logging' API for your project."
2016-02-02 23:30:09 +0000 [warn]: Dropping 5 log message(s) error_class="Google::APIClient::ClientError" error="Project has not enabled the API. Please use Google Developers Console to activate the 'logging' API for your project."
...等等。我每秒看到约 5 条这样的消息,所以我知道事情正在产生日志。但是,在计算引擎控制台中,我看到如下内容:
所以介于两者之间的某个地方,我显然丢失了很多消息。不过奇怪的是,我并没有丢失所有这些消息!
集群配置了 Logging.write 和 Monitoring.all 权限,如 GH 问题 #15727 中所建议的那样
【问题讨论】:
标签: google-compute-engine kubernetes google-kubernetes-engine fluentd