<p>I have a problem with one of the pods. It says that it is in a pending state.</p>
<pre><code>kubectl get pods -n amazon-cloudwatch                           
NAME    READY   STATUS    RESTARTS   AGE
pod-1   1/1     Running   0          17h
pod-2   1/1     Running   0          17h
pod-3   1/1     Running   0          17h
pod-4   1/1     Running   0          17h
pod-5   1/1     Running   0          17h
pod-6   0/1     Pending   0          17h
</code></pre>
<p>If I describe the pod, this is what I can see:</p>
<pre><code>Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  96s (x1011 over 17h)  default-scheduler  0/6 nodes are available: 1 Too many pods, 5 node(s) didn't match Pod's node affinity/selector.
</code></pre>
<p>In my pod YAML file, node-Selectors are defined as below.</p>
<pre><code>Node-Selectors:              kubernetes.io/os=linux
</code></pre>
<p>I am trying to set container insight by following steps in below mentioned link
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-metrics.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-metrics.html</a></p>
<p>Here, in this file Node selectors are mentioned.</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/cwagent/cwagent-daemonset.yaml
</code></pre>
<p>All my nodes are labeld with the <code>kubernetes.io/os=linux</code></p>
<pre><code> kubectl get nodes --show-labels                                               
NAME    STATUS   ROLES    AGE     VERSION               LABELS
Node1   Ready    &lt;none&gt;   11d     v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1a,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1a
Node2   Ready    &lt;none&gt;   21d     v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1a,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1a
Node3   Ready    &lt;none&gt;   21d     v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1a,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1a
Node4   Ready    &lt;none&gt;   5d12h   v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1b,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1b
Node5   Ready    &lt;none&gt;   5d13h   v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1b,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1b
Node6   Ready    &lt;none&gt;   21d     v1.23.9-eks-ba74326   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.small,beta.kubernetes.io/os=linux,eks.amazonaws.com/capacityType=ON_DEMAND,failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1b,kubernetes.io/arch=amd64,kubernetes.io/os=linux,node.kubernetes.io/instance-type=t3.small,topology.kubernetes.io/region=eu-central-1,topology.kubernetes.io/zone=eu-central-1b
</code></pre>

Ruchita Sheth
<p>Check what is the maximum pod capacity for the current node instance type. In the cluster each node has a maximum capacity for scheduling node.
<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI" rel="nofollow noreferrer">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI</a></p>
