Skip to content
CKADApplication Environment, Configuration and SecuritySingle nodeMedium

Requests, limits, LimitRange and ResourceQuota

Scenario ckad-env-003 · about 8 minutes · 10 points · 10 grader checks

Constrain a namespace with a ResourceQuota and LimitRange defaults, then deploy a workload that fits inside them.

  • resources
  • requests
  • limits
  • resourcequota
  • limitrange

What you will practise

  • Create a ResourceQuota with compute and object-count limits
  • Create a LimitRange with default requests and limits
  • Set container requests and limits on a Deployment

Start this lab

With the CLI installed and signed in, this command provisions a single node cluster on your Mac, applies the scenario setup and prints the task below.

goldenkube start ckad-env-003

Task

The task text exactly as the CLI shows it. Solve it on the cluster, then run goldenkube submit.

In namespace "quota" (create it if it does not exist): 1. Create a ResourceQuota "team-quota" that limits the namespace to requests.cpu 1, requests.memory 1Gi, limits.cpu 2, limits.memory 2Gi and at most 5 pods. 2. Create a LimitRange "defaults" that gives every container that does not declare resources a default limit of cpu 200m / memory 256Mi and a default request of cpu 100m / memory 128Mi. 3. Create a Deployment "worker", image nginx:1.27, 2 replicas, whose container requests cpu 250m / memory 256Mi and is limited to cpu 500m / memory 512Mi. Both replicas of "worker" must be Ready.

Requirements and details

Certification
CKAD · Certified Kubernetes Application Developer
Domain
Application Environment, Configuration and Security
Difficulty
Medium
Cluster topology
Single node
Cluster features
None beyond the base cluster
Recommended time
8 minutes
Points
10
Grader checks
10
Kubernetes version
1.37
Minimum CLI version
0.1.0
Scenario version
1
Published

Grading runs locally: 10 state checks read your cluster when you submit; the scenario passes when every check passes. Hints, the reference solution and the check definitions are available only inside the CLI, not on this page.

CKADApplication Environment, Configuration and SecurityEasy

ConfigMap and Secret as env vars and a volume

Create a ConfigMap and a Secret and consume them in a Pod as single env vars, envFrom and a mounted volume.

Single node · ~7 min · 9 points

  • configmap
  • secret
  • env
  • envfrom
  • volumes

goldenkube start ckad-env-001

CKADApplication Environment, Configuration and SecurityMedium

Pod and container SecurityContext

Run a Pod as a non-root user with a read-only root filesystem, no privilege escalation and no capabilities.

Single node · ~7 min · 11 points

  • securitycontext
  • runasnonroot
  • capabilities
  • readonlyrootfilesystem
  • pod

goldenkube start ckad-env-002

CKADApplication Environment, Configuration and SecurityMedium

ServiceAccount with least-privilege RBAC for an app

Give an application its own ServiceAccount with a namespaced Role and switch a running Deployment to it.

Single node · ~8 min · 10 points

  • serviceaccount
  • rbac
  • role
  • rolebinding
  • deployment

goldenkube start ckad-env-004

CKADApplication Environment, Configuration and SecurityEasy

Use a CustomResourceDefinition

Discover the schema of a custom resource and create and update objects of that kind with kubectl.

Single node · ~6 min · 8 points

  • crd
  • custom-resource
  • api-resources
  • kubectl-explain

goldenkube start ckad-env-005

Independent community project, not affiliated with or endorsed by CNCF or The Linux Foundation. Lab results are practice feedback, not an exam score.