<p>We are trying to deploy a dot net core API service to amazon EKS using ECR. The deployment was successful, but the pods are in pending status. Below are the detailed steps we followed.</p>

<p>Steps followed.
1.  Created a docker image
2.  Pushed the image to ECR. The image is now visible in aws console also.
// The image looks good, I was able to run it using my docker locally.</p>

<ol start="3">
<li><p>Created a t2-micro cluster as below
eksctl create cluster --name net-core-prod --version 1.14 --region us-west-2 --nodegroup-name standard-workers --node-type t2.micro --nodes 1 --nodes-min 1 --nodes-max 1 –managed
// Cluster and Node groups were created successfully. 
// IAM roles also got created</p></li>
<li><p>Deployed a replication controller using the attached json/yaml//net-app.json
<a href="https://i.stack.imgur.com/7gV0N.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/7gV0N.jpg" alt="enter image description here"></a></p></li>
<li>Deployed the service using the attached json/yaml //net-app-scv.json
<a href="https://i.stack.imgur.com/M9wAp.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/M9wAp.jpg" alt="enter image description here"></a></li>
<li><p>The get all command returned this. //get_all.png
<a href="https://i.stack.imgur.com/aWSzr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aWSzr.png" alt="get all"></a>
POD always remains in PENDING status.</p></li>
<li><p>Pod describe gave the below result  //describe_pod.png
<a href="https://i.stack.imgur.com/fj4io.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fj4io.png" alt="describe pod"></a></p></li>
<li>We have also tried adding policy to the cluster IAM role to include ECR permissions attached. //ECR_policy.json</li>
</ol>

<p>Key points:<br/>
1.  We are using a t2-micro instance cluster since it’s a AWS free account.<br/>
2.  We created a linux cluster and tried to push the dotnet core app. //this worked fine in our local machine<br/>
3.  The cluster had only 1 node //-nodes 1 --nodes-min 1 --nodes-max 1<br/></p>

<p>Can somebody please guide us on how to set up this correctly.</p>

snehgin
<p>On Amazon Elastic Kubernetes Service (<code>EKS</code>), the maximum number of pods per node depends on the node type and ranges from 4 to 737.</p>

<p>If you reach the max limit, you will see something like:</p>

<pre><code>❯ kubectl get node -o yaml | grep pods
      pods: "17" =&gt; this is allocatable pods that can be allocated in node
      pods: "17" =&gt; this is how many running pods you have created
</code></pre>

<p>If you get only one number, it should be allocatable. Another way to count all running pods is to run the following command:</p>

<pre><code>kubectl get pods --all-namespaces | grep Running | wc -l
</code></pre>

<p>Here's the list of max pods per node type:
<a href="https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt" rel="noreferrer">https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt</a></p>

<p>On Google Kubernetes Engine (<code>GKE</code>), the limit is 110 pods per node. check the following URL:</p>

<p><a href="https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md" rel="noreferrer">https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md</a> </p>

<p>On Azure Kubernetes Service (<code>AKS</code>), the default limit is 30 pods per node but it can be increased up to 250. The default maximum number of pods per node varies between kubenet and Azure CNI networking, and the method of cluster deployment. check the following URL for more information: </p>

<p><a href="https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni#maximum-pods-per-node" rel="noreferrer">https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni#maximum-pods-per-node</a></p>
