以下のコマンドを実行し、Container Insights をインストールします。 詳細な情報はこちらから確認できます
curl -s https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml | sed "s/{{cluster_name}}/eksworkshop-eksctl/;s/{{region_name}}/${AWS_REGION}/" | kubectl apply -f -
このコマンドにより以下のリソースが作成されます:
Namespace amazon-cloudwatch.SecurityAccountClusterRoleClusterRoleBindingConfigMapDaemonSet として Cloudwatch-Agent (メトリクス送信用).DaemonSet として fluentd (ログ送信用).以下のコマンドで、 DaemonSets がデプロイされたことを確認します
kubectl -n amazon-cloudwatch get daemonsets
Output
これで、メトリクスやログが CloudWatch に送られています