1 個回答
- 最新
- 最多得票
- 最多評論
0
To setup Container Insights for both EC2 Nodegroup and Fargate Profile in your EKS cluster, you need to follow these steps:
- Enable Container Insights for your cluster by following the steps mentioned in the official AWS documentation: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-EKS-quickstart.html
- Once you have enabled Container Insights, install the Fluent Bit log collector on your EC2 instances by running the following command:
kubectl apply -f https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-yaml-templates/quickstart/cwagent-fluent-bit-quickstart.yaml
- Verify that the Fluent Bit log collector is running by checking the logs of the fluent-bit container in the amazon-cloudwatch namespace:
kubectl -n amazon-cloudwatch logs -f fluent-bit-xxxxx
- To enable Container Insights for Fargate profiles, you need to create a Fargate profile with the cwagent and cwlogs addons enabled. You can do this by creating a YAML file with the following contents:
apiVersion: eksctl.io/v1alpha5
kind: FargateProfile
metadata:
name: my-fargate-profile
region: <region>
version: '1.17'
spec:
selectors:
- namespace: default
subnets:
- subnet-xxxxxxxx
addons:
- name: cwagent
version: 'latest'
- name: cwlogs
version: 'latest'
- Apply the YAML file using the eksctl CLI tool:
eksctl create fargateprofile -f fargate-profile.yaml
- Verify that the Fluent Bit log collector is running as a sidecar container in your Fargate pods by checking the logs of the fluent-bit container in the amazon-cloudwatch namespace:
kubectl -n amazon-cloudwatch logs -f fluent-bit-xxxxx
By following these steps, you should be able to enable Container Insights for both EC2 Nodegroup and Fargate Profile in your EKS cluster.
已回答 1 年前
相關內容
- 已提問 6 個月前
- 已提問 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 9 個月前