CKAD Scenarios Kubectl-Contexts | Pod-Resources | ConfigMap Access
CKAD prep: how to work with Kubectl Contexts, Pod Resources Requests+Limit and ConfigMap Access in Pods
FREE CKAD Scenarios? YES!
This week we added three more scenarios:
In this scenario you’ll learn to work with different kubectl contexts.
In the CKAD exam you need to breath kubectl. Kubectl is a client for the Kubernetes Apiserver and allows you to perform all kinds of operations.
A kubectl context contains connection information to a Kubernetes cluster. Different kubectl contexts can connect to different Kubernetes clusters, or to the same cluster but using different users or different default namespaces.
Pod with Resources
In this scenario we learn how to set resource requests and limits for a Pod.
Resource requests and limits are very important to set, especially in production environments. They define how much CPU and memory a Pod can use.
More specifically, how much each container can use. Because a Pod can have multiple containers and for each we can define the resources section.
Resource requests will be reserved and no other Pods can use these. This means if you set these too high you will waste precious resources. Resource requests are also used for scheduling, like “which Node has enough free resources for that Pod?”.
Resource limits are the upper limit a container can use. If the CPU limit is reached, the container will be throttled down. If the memory limit is reached, the container will be killed and restarted (if the Pod is setup for that).
ConfigMap Access in Pods
In this scenario we learn how to create and use ConfigMaps inside Pods.
ConfigMaps are amazing for configuring Pods at runtime. Containers can be build in a general way, then work differently based on the instructions or data passed into them.
The content of ConfigMaps can be passed into a container using environment variables or as mount folders/files on the filesystem.
You should be really comfortable when working with ConfigMaps in the CKAD exam. Like creating new or working with existing ones.
We plan to create new CKAD challenges weekly and post here about it. Any topics you would like to see next? Let us know in the comments!