1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
- AWS OFFICIELA mis à jour il y a 7 mois
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an