This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.14. 将日志转发到 Google Cloud Platform (GCP)
除了默认的 OpenShift Container Platform 日志存储外,您还可以将日志转发到 Google Cloud Logging。
注意
不支持在 Fluentd 中使用此功能。
先决条件
- Red Hat OpenShift Operator 5.5.1 及更新版本的日志记录子系统
流程
使用 Google 服务帐户密钥创建 secret。
oc -n openshift-logging create secret generic gcp-secret --from-file google-application-credentials.json=<your_service_account_key_file.json>
$ oc -n openshift-logging create secret generic gcp-secret --from-file google-application-credentials.json=<your_service_account_key_file.json>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用以下模板创建
ClusterLogForwarder
自定义资源 YAML:Copy to Clipboard Copied! Toggle word wrap Toggle overflow