<p>After applying the following <code>ResourceQuota</code> <code>compute-resources</code> to my GKE Cluster</p>

<pre><code>apiVersion: v1
kind: ResourceQuota
metadata:
  name: compute-resources
spec:
  hard:
    limits.cpu: "1"
    limits.memory: 1Gi
</code></pre>

<p>and updating a <code>Deployment</code> to</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-service
spec:
  selector:
    matchLabels:
      app: my-service
      tier: backend
      track: stable
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 50%
  template:
    metadata:
      labels:
        app: my-service
        tier: backend
        track: stable
    spec:
      containers:
        - name: my-service
          image: registry/namespace/my-service:latest
          ports:
            - name: http
              containerPort: 8080
          resources:
            requests:
              memory: "128Mi"
              cpu: "125m"
            limits:
              memory: "256Mi"
              cpu: "125m"
</code></pre>

<p>the scheduling fails 100% of tries due to <code>pods "my-service-5bc4c68df6-4z8wp" is forbidden: failed quota: compute-resources: must specify limits.cpu,limits.memory</code>. Since <code>limits</code> and <code>requests</code> are specified and they fulfill the limit, I don't see a reason why the pods should be forbidden.</p>

<p><a href="https://stackoverflow.com/questions/32034827/how-pod-limits-resource-on-kubernetes-enforced-when-the-pod-exceed-limits-after">How pod limits resource on kubernetes enforced when the pod exceed limits after pods is created ?</a> is a different question.</p>

<p>I upgraded my cluster to  1.13.6-gke.0.</p>

Kalle Richter
<p>I was about to suggest to test within separate namespace, but see that you already tried.</p>

<p>As another workaround try to setup default limits by enabling LimitRanger admission controller and setting it up e.g.</p>

<pre><code>apiVersion: v1
kind: LimitRange
metadata:
  name: cpu-limit-range
spec:
  limits:
  - default:
      memory: 256Mi
      cpu: 125m
    defaultRequest:
      cpu: 125m
      memory: 128Mi
    type: Container
</code></pre>

<p>Now if a Container is created in the default namespace, and the Container does not specify its own values for CPU request and CPU limit, the Container is given a default CPU limits of 125m and a default memory limit of 256Mi</p>

<p>Also, after setting up LimitRange, make sure you removed your deployment and there are no pods stuck in failed state. </p>
