简体   繁体   English

如何在不使用Stackdriver的情况下登录GKE

[英]How to go about logging in GKE without using Stackdriver

We are unable to grab logs from our GKE cluster running containers if StackDriver is disabled on GCP. 如果在GCP上禁用了StackDriver,则无法从运行GKE集群的容器中获取日志。 I understand that it is proxying stderr/stdout but it seems rather heavy handed to block these outputs when Stackdriver is disabled. 我知道它正在代理stderr / stdout,但是在禁用Stackdriver时似乎很难处理这些输出。

How does one get an ELF stack going on GKE without being billed for StackDriver aka disabling it entirely? 如何使ELF堆栈在GKE上运行而又无需为StackDriver计费又将其完全禁用呢? or is it so much a part of GKE that this is not doable? 还是GKE太多了以至于这不可行?

From the article linked on a similar question regarding GCP: 在有关GCP的类似问题的链接文章中:

"Kubernetes doesn't specify a logging agent, but two optional logging agents are packaged with the Kubernetes release: Stackdriver Logging for use with Google Cloud Platform, and Elasticsearch. You can find more information and instructions in the dedicated documents. Both use fluentd with custom configuration as an agent on the node." “ Kubernetes没有指定日志记录代理,但是Kubernetes版本中打包了两个可选的日志记录代理:用于Google Cloud Platform的Stackdriver Logging和Elasticsearch。您可以在专用文档中找到更多信息和说明。自定义配置作为节点上的代理。” ( https://kubernetes.io/docs/concepts/cluster-administration/logging/#exposing-logs-directly-from-the-application ) https://kubernetes.io/docs/concepts/cluster-administration/logging/#exposed-logs-direct-from-the-application

Perhaps our understanding of Stackdriver billing is wrong? 也许我们对Stackdriver计费的理解是错误的?

But we don't want to be billed for Stackdriver as the 150MB of logs outside of the GCP metrics is not going to be enough and we have some expertise in setting up ELF for logging that we'd like to use. 但是我们不希望为Stackdriver付费,因为GCP指标之外的150MB日志还不够用,并且我们在设置ELF以便使用的日志方面拥有一些专业知识。

You can disable Stackdriver logging/monitoring on Kubernetes by editing your cluster, and setting "Stackdriver Logging" and "Stackdriver Monitoring" to disable. 您可以通过编辑集群并设置“ Stackdriver Logging”和“ Stackdriver Monitoring”为禁用来禁用Kubernetes上的Stackdriver日志记录/监视。

I would still suggest sticking to GCP over AWS as you get the whole Kube as a service experience. 我仍然建议您在获得整个Kube即服务体验时坚持使用AWS上的GCP。 Amazon's solution is still a little way off, and they are planning charging for the service in addition to the EC2 node prices (Last I heard). 亚马逊的解决方案还有一点距离,除了EC2节点价格外,他们还计划对该服务收费(最后我听说)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM