英文:
Custom kubernetes cluster logging to Google Cloud Logging
问题
我有一个自定义的Kubernetes集群。
我想要在Google Cloud日志中观看日志。
我已经阅读了许多关于Elasticsearch的解决方案,但我更喜欢使用GCL。
我开始阅读关于FluentD / FluentBit的内容,但现在我不知道如何启动它。
我找不到任何相关文档。
我应该从哪里开始?
更新:
我在Azure上有一个K8S集群,我想要使用Google Cloud日志。
更新:
我找到了名为"stackdriver"的FluentBit输出插件。
问题是,当我使用下面的配置时,我收到了一个错误消息。
配置:
outputs: |
[OUTPUT]
Name stackdriver
Match *
service_account_email {{ .Values.stackdriver.service_account_email }}
service_account_secret {{ .Values.stackdriver.service_account_secret }}
helm template .
命令显示一切都正常。
但当我安装模板时,出现以下错误:
[2023/01/11 13:35:12] [ info] [output:stackdriver:stackdriver.0] metadata_server set to http://metadata.google.internal
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] client_email is not defined, using a default one
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] private_key is not defined, fetching it from metadata server
[2023/01/11 13:35:12] [ warn] [net] getaddrinfo(host='metadata.google.internal', err=-2): Name or service not known
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] failed to create metadata connection
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] can't fetch token from the metadata server
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] token retrieval failed
[2023/01/11 13:35:12] [ warn] [net] getaddrinfo(host='metadata.google.internal', err=-2): Name or service not known
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] failed to create metadata connection
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] can't fetch project id from the metadata server
[2023/01/11 13:35:12] [error] [output] failed to initialize 'stackdriver' plugin
英文:
I have a custom kuberentes cluster. <br>
I would like to watch the logs in the Google Cloud Logging. <br>
I've already read a lot solutions for Elasticsearch but I would prefer the GCL. <br>
I start read about the FluentD / FluentBit but now I don't know how to start it. <br>
<br>
I couldn't find any documentation for that. <br>
Where should I start?
UPDATE: <br>
K8S Cluster on Azure and I would like to use the Google Cloud Logging.
UPDATE: <br>
I found the fluentBit OUTPUT plugin named stackdriver. <br>
The problem now when I use the config below I get an error message.
Config:
outputs: |
[OUTPUT]
Name stackdriver
Match *
service_account_email {{ .Values.stackdriver.service_account_email }}
service_account_secret {{ .Values.stackdriver.service_account_secret }}
The helm template .
command shows that its good. <br>
But when I install the template this is the error:
[2023/01/11 13:35:12] [ info] [output:stackdriver:stackdriver.0] metadata_server set to http://metadata.google.internal
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] client_email is not defined, using a default one
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] private_key is not defined, fetching it from metadata server
[2023/01/11 13:35:12] [ warn] [net] getaddrinfo(host='metadata.google.internal', err=-2): Name or service not known
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] failed to create metadata connection
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] can't fetch token from the metadata server
[2023/01/11 13:35:12] [ warn] [output:stackdriver:stackdriver.0] token retrieval failed
[2023/01/11 13:35:12] [ warn] [net] getaddrinfo(host='metadata.google.internal', err=-2): Name or service not known
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] failed to create metadata connection
[2023/01/11 13:35:12] [error] [output:stackdriver:stackdriver.0] can't fetch project id from the metadata server
[2023/01/11 13:35:12] [error] [output] failed to initialize 'stackdriver' plugin
答案1
得分: 0
在那个版本中存在一个错误: github.com/fluent/fluent-bit/issues/6691
英文:
There was a bug in that version: github.com/fluent/fluent-bit/issues/6691
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论