title: How to add resource and limits on Kubernetes Engine on Google Cloud Platform
body: <p>I am trying to add resource and limits to my deployment on Kuberenetes Engine since one of my deployment on the pod is continuously getting evicted with an error message <code>The node was low on resource: memory. Container model-run was using 1904944Ki, which exceeds its request of 0.</code> I assume that the issue could be resolved by adding resource requests. </p>
  
  <p>When I try to add resource requests and deploy, the deployment is successful but when I go back and and view detailed information about the Pod, with the command
  <code>kubectl get pod default-pod-name --output=yaml --namespace=default</code>
  It still says the pod has request of cpu: 100m and without any mention of memory that I have allotted. I am guessing that the cpu request of 100m was a default one. Please let me know how I can allot the requests and limits, the code I am using to deploy is as follows:</p>
  
  <pre><code>kubectl run model-run --image-pull-policy=Always --overrides='
  {
      "apiVersion": "apps/v1beta1",
      "kind": "Deployment",
      "metadata": {
          "name": "model-run",
          "labels": {
              "app": "model-run"
          }
      },
      "spec": {
          "selector": {
              "matchLabels": {
                  "app": "model-run"
              }
          },
          "template": {
              "metadata": {
                  "labels": {
                      "app": "model-run"
                  }
              },
              "spec": {
                  "containers": [
                      {
                          "name": "model-run",
                          "image": "gcr.io/some-project/news/model-run:development",
                      "imagePullPolicy": "Always",
                        "resouces": {
                          "requests": [
                            {
                              "memory": "2048Mi",
                              "cpu": "500m"
                            }
                          ],
                          "limits": [
                            {
                              "memory": "2500Mi",
                              "cpu": "750m"
                            }
                          ]
                        },
                          "volumeMounts": [
                              {
                                  "name": "credentials",
                                  "readOnly": true,
                                  "mountPath":"/path/collection/keys"
                              }
                          ],
                          "env":[
                              {
                                  "name":"GOOGLE_APPLICATION_CREDENTIALS",
                                  "value":"/path/collection/keys/key.json"
                              }
                                  ]
                      }
                  ],
                  "volumes": [
                      {
                          "name": "credentials",
                          "secret": {
                              "secretName": "credentials"
                          }
                      }
                  ]
              }
          }
      }
  }
  '  --image=gcr.io/some-project/news/model-run:development
  </code></pre>
  
  <p>Any solution will be appreciated</p>