简体   繁体   English

如何将kubernetes容器日志文件转发到Stackdriver?

[英]How to forward a kubernetes container log file into Stackdriver?

I have a cluster in Google and the Stackdriver logging, and monitoring are enabled. 我在Google中有一个集群,并且Stackdriver日志记录和监视已启用。

Question 1: 问题1:

How can I forward file based logs into stackdriver? 如何将基于文件的日志转发到stackdriver?

I tried these steps: 我尝试了以下步骤:

  • change the fluentd config map in kube-system name space - I was unable to change 更改kube系统名称空间中的fluentd配置图-我无法更改
  • tried to install the stackdriver agent into a container and after forward it somehow to stackdriver. 尝试将stackdriver代理安装到容器中,然后以某种方式将其转发到stackdriver。 I gave some authorization error. 我给了一些授权错误。
  • turn off the default Stackdriver logging, and create an own daemonset and config set for the logging. 关闭默认的Stackdriver日志记录,并为日志记录创建自己的守护程序集和配置集。

As I found in kubernetes manual 正如我在kubernetes手册中发现的那样

Logging Using Stackdriver - Kubernetes in the Prerequests section 使用Stackdriver-Kubernetes进行记录的前提条件部分

If you're on GKE and Stackdriver Logging is enabled in your cluster, you cannot change its parameters 如果您使用的是GKE,并且集群中启用了Stackdriver Logging,则无法更改其参数

Question 2: 问题2:

How to monitor free space on additional disk in kubernetes containers? 如何监视kubernetes容器中其他磁盘上的可用空间?

Another issue, the default Stackdriver monitoring doesn't know anything about the additional disks which attached to containers. 另一个问题是,默认的Stackdriver监视对容器附带的其他磁盘一无所知。 That is my next problem, how to monitor the additional disk spaces. 这是我的下一个问题,即如何监视其他磁盘空间。

That disks are a Persistent Volume Claims in kubernetes side, and provisioned automatically. 该磁盘是kubernetes端的持久卷声明,并且是自动配置的。

How to monitor free space on additional disk in kubernetes containers? 如何监视kubernetes容器中其他磁盘上的可用空间?

Right now there is no way to find that out, but there is an open proposal and work will happen later on this. 现在还没有办法找到答案,但是有一个开放的建议,稍后将进行工作。 See the proposal here . 这里查看提案。

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

相关问题 如何在Google Cloud的Stackdriver中获取kubernetes容器日志文件的内容? - How to get content of a kubernetes container log files in the Stackdriver in google cloud? 使用Stackdriver在Kubernetes集群中使用日志自定义Docker容器 - Custom docker container in Kubernetes cluster with log using Stackdriver 如何将 JSON 从 GCE 容器 VM 记录到 Stackdriver? - How to log JSON from a GCE Container VM to Stackdriver? Kubernetes 堆栈驱动程序日志级别与 Wildfly 10 不正确 - Kubernetes stackdriver log level not correct with wildfly 10 Kubernetes 中的 Sidecar 容器日志文件路径问题 - Issue with Sidecar container log file path in Kubernetes 如何查看日志是来自在 Jenkins Kubernetes 容器上运行的 Java 应用程序的 Stackdriver - How to see logs is Stackdriver from Java application run on Jenkins Kubernetes container 如何在 kube.netes 中停止 I/O 日志容器 - how to stop I/O log container in kubernetes 如何在 GKE 上通过 stackdriver 查看容器日志 - How to view container logs via stackdriver on GKE Kubernetes:如何将容器日志文件挂载到主机 - Kubernetes: how can I mount container log files to host kubernetes如何设置日志文件的最大大小? - kubernetes how to set the maximum size of the log file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM