title: GCloud kubernetes cluster with 1 Insufficient cpu error
body: <p>I created a Kubernetes cluster on Google Cloud using:</p>
  
  <pre><code>gcloud container clusters create my-app-cluster --num-nodes=1
  </code></pre>
  
  <p>Then I deployed my 3 apps (backend, frontend and a scraper) and created a load balancer. I used the following configuration file:</p>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
      name: my-app-deployment
      labels:
          app: my-app
  spec:
      replicas: 1
      selector:
          matchLabels:
              app: my-app
      template:
          metadata:
              labels:
                  app: my-app
          spec:
              containers:
                - name: my-app-server
                  image: gcr.io/my-app/server
                  ports:
                    - containerPort: 8009
                  envFrom:
                    - secretRef:
                          name: my-app-production-secrets
                - name: my-app-scraper
                  image: gcr.io/my-app/scraper
                  ports:
                    - containerPort: 8109
                  envFrom:
                    - secretRef:
                          name: my-app-production-secrets
                - name: my-app-frontend
                  image: gcr.io/my-app/frontend
                  ports:
                    - containerPort: 80
                  envFrom:
                    - secretRef:
                          name: my-app-production-secrets
  
  ---
  
  apiVersion: v1
  kind: Service
  metadata:
      name: my-app-lb-service
  spec:
      type: LoadBalancer
      selector:
          app: my-app
      ports:
        - name: my-app-server-port
          protocol: TCP
          port: 8009
          targetPort: 8009
        - name: my-app-scraper-port
          protocol: TCP
          port: 8109
          targetPort: 8109
        - name: my-app-frontend-port
          protocol: TCP
          port: 80
          targetPort: 80
  </code></pre>
  
  <p>When typing <code>kubectl get pods</code> I get:</p>
  
  <pre><code>NAME                                   READY     STATUS    RESTARTS   AGE
  my-app-deployment-6b49c9b5c4-5zxw2   0/3       Pending   0          12h
  </code></pre>
  
  <p>When investigation i Google Cloud I see "Unschedulable" state with "insufficient cpu" error on pod:</p>
  
  <p><a href="https://i.stack.imgur.com/7boXc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7boXc.png" alt="Unschedulable state due to Insufficient cpu"></a></p>
  
  <p>When going to Nodes section under my cluster in the Clusters page, I see 681 mCPU requested and 940 mCPU allocated:
  <a href="https://i.stack.imgur.com/tLpKL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tLpKL.png" alt="enter image description here"></a></p>
  
  <p>What is wrong? Why my pod doesn't start?</p>