From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configuring resource limits and requests

Configuring resource limits and requests

- In this video, I'll demonstrate how to work with resource limits and requests. For your convenience, the steps of the demo are right here on the slide. So to start with, I'm using "kubectl create quota". This "create quota" has pretty good help, "-h" in many cases, as you know, is showing how to use it. And a command like this is really convenient if you know how to find it, on the exam. And I am going to use "kubectl create quota qtest --hard", "pods" is "3", "cpu" is "100m", "memory" is "500mi --namespace limited". Oops. Did we already create namespace limited? We did not, so let me edit this command. Control + A to go to the beginning of the command line and "kubectl create ns limited", followed by "kubectl create quota". There we go. The resource quota is created. So, we can figure it out using "kubectl describe quota" on "-n limited". And there we can see the current setting of the quota. So, let's figure out how it works, "kubectl create deploy nginx", "--image" is "nginx"…

Contents