Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 1.48 KB

13-Practice-Test-Resource-Limits.md

File metadata and controls

82 lines (56 loc) · 1.48 KB

Practice Test - Resource Limits

Solutions to practice test - resource limtis

  • Run the command 'kubectl describe pod rabbit' and inspect requests.

    $ kubectl describe pod rabbit
    
  • Run the command 'kubectl delete pod rabbit'.

    $ kubectl delete pod rabbit
    
  • Run the command 'kubectl get pods' and inspect the status of the pod elephant

    $ kubectl get pods
    
  • The status 'OOMKilled' indicates that the pod ran out of memory. Identify the memory limit set on the POD.

  • Generate a template of the existing pod.

    $ kubectl get pods elephant -o yaml > elephant.yaml
    

    Update the elephant.yaml pod defination with the resource memory limits to 20Mi

    resources:
        limits:
          memory: 20Mi
    ---
    </details>
    
    Delete the pod and recreate it.
    
    <details>
    
    

    $ kubectl delete pod elephant $ kubectl create -f elephant.yaml

    </details>
    
    
  • Inspect the status of POD. Make sure it's running

    $ kubectl get pods
    
  • Run the command 'kubectl delete pod elephant'.

    $ kubectl delete pod elephant