Amazon-Web-Services
使用 fluentd 將 Kube 日誌發送到 Cloudwatch
我的集群在 AWS 上,我使用 kops 按集群建構。
我正在嘗試使用 fluentd 將 kubernetes 日誌發送到 AWS Cloud-watch。我能夠站起來流利的豆莢。
我從 pod 的日誌中看到以下錯誤。我已經為 pod 創建了必要的策略,以假設將日誌發送到雲監視日誌中的日誌組。
2018-10-23 18:16:03 +0000 [warn]: temporarily failed to flush the buffer. next_retry=2018-10-23 18:15:59 +0000 error_class="Aws::Errors::MissingCredentialsError" error="unable to sign request without credentials set" plugin_id="object:2b07171c9ce4" 018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/signature_v4.rb:72:in `sign_request' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/signature_v4.rb:112:in `apply_signature' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/signature_v4.rb:65:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/retry_errors.rb:138:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/json/handler.rb:11:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/user_agent.rb:13:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/seahorse/client/plugins/endpoint.rb:45:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/param_validator.rb:24:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/seahorse/client/plugins/response_target.rb:23:in `call' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.22.1/lib/seahorse/client/request.rb:70:in `send_request' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/aws-sdk-cloudwatchlogs-1.4.0/lib/aws-sdk-cloudwatchlogs/client.rb:736:in `describe_log_groups' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluent-plugin-cloudwatch-logs-0.4.5/lib/fluent/plugin/out_cloudwatch_logs.rb:403:in `log_group_exists?' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluent-plugin-cloudwatch-logs-0.4.5/lib/fluent/plugin/out_cloudwatch_logs.rb:152:in `block in write' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluent-plugin-cloudwatch-logs-0.4.5/lib/fluent/plugin/out_cloudwatch_logs.rb:144:in `each' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluent-plugin-cloudwatch-logs-0.4.5/lib/fluent/plugin/out_cloudwatch_logs.rb:144:in `write' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluentd-0.12.43/lib/fluent/buffer.rb:354:in `write_chunk' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluentd-0.12.43/lib/fluent/buffer.rb:333:in `pop' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluentd-0.12.43/lib/fluent/output.rb:342:in `try_flush' 2018-10-23 18:16:04 +0000 [warn]: /fluentd/vendor/bundle/ruby/2.4.0/gems/fluentd-0.12.43/lib/fluent/output.rb:149:in `run' 2018-10-23 18:16:07 +0000 [warn]: temporarily failed to flush the buffer. next_retry=2018-10-23 18:16:01 +0000 error_class="Aws::Errors::MissingCredentialsError" error="unable to sign request without credentials set" plugin_id="object:2b07171c9ce4" 2018-10-23 18:16:07 +0000 [warn]: suppressed same stacktrace
我安裝了 kube2iam 並解決了這個問題。