1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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.
con risposta un anno fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 9 mesi fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa