rancher 2.6 logging output alyun oss
|字数总计: 283|阅读时长: 1分钟|阅读量:
本文永久链接: https://www.xtplayer.cn/rancher/rancher-2-6-logging-output-alyun-oss-example/
参考 https://kube-logging.dev/docs/configuration/plugins/outputs/secret/ 创建授权密文
apiVersion: v1 kind: Secret type: Opaque metadata: annotations: logging.banzaicloud.io/default: watched name: oss-auth-secret namespace: cattle-logging-system data: username: <base64 加密> password: <base64 加密>
|
- 创建 ClusterOutput,oss 插件配置参数参考 https://kube-logging.dev/docs/configuration/plugins/outputs/oss/ ,buffer 配置参数参考 https://kube-logging.dev/docs/configuration/plugins/outputs/buffer/#buffer
apiVersion: logging.banzaicloud.io/v1beta1 kind: ClusterOutput metadata: name: oss-clusteroutput annotations: labels: namespace: cattle-logging-system spec: oss: endpoint: <aliyun-oss-url> aaccess_key_secret: mountFrom: secretKeyRef: key: password name: oss-auth-secret access_key_id: mountFrom: secretKeyRef: key: username name: oss-auth-secret auto_create_bucket: true bucket: rancher-logging-bucket buffer: type: file chunk_limit_size: 8M flush_interval: 1s flush_mode: interval flush_thread_count: 8 queued_chunks_limit_size: 10 retry_forever: true total_limit_size: 50GB check_bucket: true check_object: true download_crc_enable: true hex_random_length: 4 index_format: "%d" key_format: "%{path}/%{time_slice}_%{index}_%{thread_id}.%{file_extension}" open_timeout: 10 oss_sdk_log_dir: /var/log/td-agent overwrite: false path: fluent/logs read_timeout: 120 store_as: gzip upload_crc_enable: true slow_flush_log_threshold: 20.0 __clone: true
|