...

/

Exploring the Effects by Violating Quotas

Exploring the Effects by Violating Quotas

In this lesson, we will violate some Quotas and analyze the consequences.

Exploring the Effects

Now let’s create the objects and explore the effects as we defined the resource quotas in the previous lesson.

Creating the dev Namespace

Let’s get started by creating the dev Namespace as per our plan.

Press + to interact
kubectl create \
-f res/dev.yml \
--record --save-config

We can see from the output that the namespace "dev" was created as well as the resourcequota "dev". To be on the safe side, we’ll describe the newly created devquota.

Press + to interact
kubectl --namespace dev describe \
quota dev

The output is as follows.

Press + to interact
Name: dev
Namespace: dev
Resource Used Hard
-------- ---- ----
limits.cpu 0 1
limits.memory 0 1Gi
pods 0 10
requests.cpu 0 800m
requests.memory 0 500Mi
services.nodeports 0 0

We can see that the hard limits are set and that there’s currently no usage. That was to be expected since we’re not running any objects in the dev Namespace.

Creating Resources

Let’s spice it up a bit by creating the already too familiar go-demo-2 objects.

Press + to interact
kubectl --namespace dev create \
-f res/go-demo-2.yml \
--save-config --record
kubectl --namespace dev \
rollout status \
deployment go-demo-2-api

We created the objects from the go-demo-2.yml file and waited until the go-demo-2-api Deployment rolled out.

Looking into the Description

Now we can revisit the values of the dev quota.

Press + to interact
kubectl --namespace dev describe \
quota dev

The output is as follows.

Press + to interact
Name: dev
Namespace: dev
Resource Used Hard
-------- ---- ----
limits.cpu 400m 1
limits.memory 130Mi 1Gi
pods 4 10
requests.cpu 40m 800m
requests.memory 65Mi 500Mi
services.nodeports 0 0

Judging from the Used column, we can see that we are, for example, currently running ...

Access this course and 1400+ top-rated courses and projects.