<p>I have a container written in go. It deploys and runs on my DockerDesktop &amp; on my Kubernetes cluster in DockerDesktop.</p>
<p>I have pushed the same container to Artefact Repository and it fails to deploy.</p>
<p>So I deployed it to CloudRun, and it works! Very confused.</p>
<p>My GKE cluster is autopilot so I assume the are no resource issues.</p>
<p>I expected to get a running container however i got</p>
<p>Cannot schedule pods: Insufficient cpu.
PodUnschedulable
Reason
Cannot schedule pods: Insufficient cpu.
Learn more
Source
gmail-sender-7944d6d4d4-tsdt9
gmail-sender-7944d6d4d4-pc9xp
gmail-sender-7944d6d4d4-kdlds
PodUnschedulable Cannot schedule pods: Insufficient memory.</p>
<p>My deployment file is as follows</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: gmail-sender
  labels:
    app: gmail-sender
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gmail-sender
  template:
    metadata:
      labels:
        app: gmail-sender
    spec:
      containers:
        - name: gmail-sender
          image: europe-west2-docker.pkg.dev/ea-website-359514/gmail-sender/gmail-sender:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8099
---
apiVersion: v1
kind: Service
metadata:
  name: gmail-sender-cluster-ip
  labels:
    app: gmail-sender
spec:
  ports:
    - port: 8099
      protocol: TCP
</code></pre>

<p>Looking at the error it is clear that node doesnt have sufficient memory and cpu to schedule/run the workload. Check the node configuration and ensure that resources are available on the node to host the workload</p>
<pre><code>Cannot schedule pods: Insufficient cpu. 
PodUnschedulable Reason Cannot schedule pods: Insufficient cpu. 

Learn more Source gmail-sender-7944d6d4d4-tsdt9 
gmail-sender-7944d6d4d4-pc9xp gmail-sender-7944d6d4d4-kdlds PodUnschedulable 
Cannot schedule pods: Insufficient memory.
</code></pre>
