aws-samples / amazon-cloudwatch-container-insights

CloudWatch Agent Dockerfile and K8s YAML templates for CloudWatch Container Insights.
MIT No Attribution
164 stars 107 forks source link

0/6 nodes are available: 1 Too many pods, 5 node(s) didn't match Pod's node affinity/selector. #102

Open ZukkyBaig opened 2 years ago

ZukkyBaig commented 2 years ago

Hi,

I have followed the Quick Start Container Insights - tutorial.

I used the following command:

ClusterName='clusterName'
LogRegion='logRegion'
FluentBitHttpPort='2020'
FluentBitReadFromHead='Off'
[[ ${FluentBitReadFromHead} = 'On' ]] && FluentBitReadFromTail='Off'|| FluentBitReadFromTail='On'
[[ -z ${FluentBitHttpPort} ]] && FluentBitHttpServer='Off' || FluentBitHttpServer='On'
curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluent-bit-quickstart.yaml | sed 's|{{cluster_name}}|'${ClusterName}'|;s|{{region_name}}|'${LogRegion}'|;s|{{http_server_toggle}}|"'${FluentBitHttpServer}'"|;s|{{http_server_port}}|"'${FluentBitHttpPort}'"|;s|{{read_from_head}}|"'${FluentBitReadFromHead}'"|;s|{{read_from_tail}}|"'${FluentBitReadFromTail}'"|' | kubectl apply -f -

It applied successfully, however, the pods are err'ing out with the following error:

0/6 nodes are available: 1 Too many pods, 5 node(s) didn't match Pod's node affinity/selector.

image

What am I doing wrong? For reference, I am using EKS with Fargate. I read online about removing the tolerations, however, i'm unsure if this would fix the issue. And I thought about adding the nodeSelector key, but unsure where exactly to put it inside the .yaml file that is downloaded.

Your assistance would be great!

Thank you.