Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Pass the CKA exam with these 100 practice questions
Rating: 4.2 out of 5(227 ratings)
1,209 students

Pass the CKA exam with these 100 practice questions

Learn Kubernetes with 100 questions
Created byBenjamin Huis
Last updated 11/2023
English

What you'll learn

  • Cluster Architecture, Installation & Configuration: Learn how to set up and configure Kubernetes clusters like a pro.
  • Workloads & Scheduling: Understand how to manage and schedule workloads efficiently within Kubernetes.
  • Services & Networking: Master the art of networking and service management in a Kubernetes environment.
  • Storage: Discover the best practices for handling storage in Kubernetes and ensure seamless data management.
  • Troubleshooting: Develop the skills to troubleshoot common issues that may arise in a Kubernetes setup.

Course content

1 section100 lectures3h 28m total length
  • Update the image of the deployment1:26

    Update the deployment image using an imperative approach with kubectl set image, updating to version 1.99.8, and verify the deployment is running with kubectl get deployment.

  • Change the static pod path1:04

    Update the static pod path by locating and editing the kubelet config yaml with nano, then save to manage all static pods on the node, which recreate after deletion.

  • Upgrade the cluster1:53

    Upgrade the cluster by following nine steps to update kubeadm, kubelet, and kubectl, including draining and cordoning nodes, applying upgrades, restarting kubelet, and uncordoning.

  • Create a deployment with replicas1:41

    Learn to scale a deployment by creating it with kubectl create deployment and increasing replicas to two to have more pods, then verify with kubectl describe.

  • Create a pod with labels1:06

    Create a pod and attach labels to organize and select subsets of objects. Use kubectl run to define the pod name and image, then kubectl describe to verify the labels.

  • Create a pod in a namespace1:15

    Create a namespace to organize the cluster into virtual sub clusters and isolate resources. Deploy a pod with kubectl run, define the image, and assign it to the tech namespace.

  • Create a pod and expose it1:54
  • Upgrade a deployment by using rolling update3:42

    Prepare for the cka exam by upgrading a one-replica deployment with rolling update, using kubectl set image, the record flag for rollback, and rollout history to verify changes.

  • Create a pod with a command4:05

    Create a static pod on a node by locating the kubelet config, crafting a pod yaml with a sleep command, and deploying it via scp to the static pod path.

  • Taint a node to be unschedulable4:41

    learn how to taint a node to make it unschedulable and use tolerations to schedule pods, with kubectl commands and YAML configuration to verify scheduling.

  • Create a new service account, clusterrole and clusterrolebinding3:53

    Create a service account, define a cluster role and cluster role binding, and deploy a pod from a yaml file to list persistent volumes in Kubernetes.

  • Create a NetworkPolicy that allows all pods in the namespace to use one port4:23

    Isolate all pods in a namespace by allowing only port 80 via an ingress network policy, created from a YAML file and verified with kubectl describe.

  • List all the internal IP's of all the nodes in the cluster1:55

    Apply jsonpath using the cube ctl cheat sheet to filter cluster data, replace external with internal, and output internal ips to a text file for quick verification.

  • Create a multipod with two containers and add a command2:07

    Create a multi-part pod with two containers to share data via a sidecar, add a sleep command, and save a YAML file before deploying the pod in running state.

  • Create a new user and grant him access to the cluster8:41

    Create a user by generating a certificate signing request and private key, save the CSR in YAML, then approve the CSR and apply a role binding in the tech namespace.

  • Create a service from the pod and run a DNS lookup to check the service2:10

    Start a pod-backed service and run a DNS lookup to verify connectivity, expose the service with a defined name and port, and confirm the result by inspecting the output.

  • Create a secret and mount it to the pod3:28

    Create a secret with kubectl, mount it to the pod as a volume via yaml, and verify the secret is attached, noting secrets are preferred over config maps for security.

  • List all the the persistent volumes sorted by capacity1:43

    Learn to sort persistent volumes by capacity with kubectl, using the Kubernetes documentation and cheat sheet to copy the command and write results to a text file.

  • Find the pod which is consuming the most CPU1:34

    Learn to identify the pod with the highest cpu usage using kubectl top, sorting by cpu for pods labeled environment=process, and capture results to a text file.

  • Use JSON path to get all the node names1:56

    Use jsonpath to extract all node names with kubectl, save output to a text file, and verify the file contents for exam-ready familiarity.

  • Show the logs from the container1:23

    learn to retrieve container logs using kubectl, selecting the correct pod and container in devnet, saving logs to a file, and verifying the log content.

  • Create a new ingress resource and expose the service on a path2:57

    Create and configure an ingress resource to expose service on path, copy YAML from docs, set namespace and service name, use port 5678, and deploy with kubectl create -f.

  • Overwrite the label of the pod with a value1:22

    Override the pod label with kubectl label using the override flag, set environment to true, and verify the new label with a describe command.

  • Upgrade the image in the deployment, check the history and roll back1:55

    Upgrade the deployment image from BusyBox 1.27 to 1.28 with kubectl set image, verify the version in the deployment, then roll back and confirm the previous image.

  • Find out which pods are available with the label in the cluster1:08

    Learn to select pods by their labels to filter running pods, verify three pods are running, and save the results to a text file.

  • Find out why a pod is failing and fix the issue2:07

    Troubleshoot pod failures with practical steps: diagnose crash loop back off, delete and recreate the pod, fix the sleep command in the yaml, apply the changes, and verify it runs.

  • Create a pod that will only be scheduled on a node with a specific label2:52

    Label a node and use a node selector in yaml to ensure a pod is scheduled only on that labeled node.

  • Create a pod which uses a persistent volume for storage4:39

    Learn to create and attach a persistent volume to a pod by configuring a persistent volume claim and mounting it, then verify the binding.

  • Remove the taint added to the node1:42

    Remove the taint from a node by adding a dash to the taint, then describe the node to verify the taint is gone.

  • Take a backup and restore ETCD7:10

    Learn to back up and restore etcd in a Kubernetes environment by verifying data across nodes, capturing etcd snapshots, and restoring from backup on minikube.

  • Schedule a pod on the node by using tolerations2:32

    Learn how to use tolerations to schedule a pod on tainted nodes, create and edit a pod yaml with tolerations, and verify the pod lands on the correct node.

  • Apply autoscaling to the deployment1:25

    Apply autoscaling to automate deployment scaling, reducing manual effort and costs in large projects. Verify deployments and confirm the green deployment runs correctly after scaling.

  • Check how many nodes are in ready state1:18

    Learn to verify how many nodes are in ready state using kubectl, describe, and grep, then save and review the results for effective troubleshooting.

  • Create a pod and set the environment variable1:48

    Create and set an environment variable in a pod with kubectl, then verify it by echoing inside the container; secrets or config maps are the usual store.

  • Create a configmap and add it to the pod3:28

    Create and configure a config map, inspect it with kubectl describe, and wire it into a pod via a yaml file, then deploy, run, and verify the environment.

  • List all the events sorted by the timestamp1:44

    Sort all events by timestamp using kubectl get events, following the kubectl cheat sheet, copy the command, run it in the terminal, and save and verify the log file.

  • Create a pod with a non-persistent volume3:19

    Create a pod with a non-persistent volume using a yaml file and kubectl create -f, verify the pod runs, and describe the volume to confirm non-persistent storage suitable for logging.

  • Investigate the node and bring it back to ready state1:46

    Investigate why a node is not ready, check its status and description, ssh into the node, adjust the route, restart the kubelet, and bring the node back to ready.

  • Make the node unavailable and reschedule all the pods on it1:48

    Cordon and drain a Kubernetes node to mark it unavailable and reschedule all pods, enabling safe node upgrades and ensuring pods run on other nodes.

  • Create a pod which echo's a sentence, exists and is deleted automatically1:13

    Create a pod that echoes a sentence and deletes itself automatically using kubectl run with restart policy never, ensuring the pod does not persist after execution.

  • Annotate an existing pod and use a value1:21

    Explore how to apply annotations to a running Kubernetes pod to attach non-identifying metadata, compare annotations with labels, and retrieve the annotated values.

  • Get a list of all the pods in all the namespaces1:09

    Learn to retrieve all pods across all namespaces with kubectl get pods --all-namespaces, save the output to a text file, and verify the results.

  • Update the password in the existing configmap3:29

    Update an existing config map by editing and replacing the old password, then verify with kubectl describe, kubectl replace -f --force, and exec into the pod to confirm new password.

  • Troubleshoot a pod which is not scheduling on the node and fix the issue2:30

    fix a typo in the node selector to resolve a pending pod, verify labels, and kubectl replace -f after saving a yaml file.

  • Create a network policy and allow traffic from a pod to two services2:20

    Create a Kubernetes network policy in yaml to allow a pod to egress to two services on ports 8080 and 5432, using an internal policy in the default namespace.

  • Create a pod and set "SYS_TIME", and let it sleep for one hour2:49

    Configure a pod with sys_time in a Kubernetes security context, edit the yaml, remove net admin, create with -f, and verify the pod and sleep command for CKA exam prep.

  • Create a clusterrole and a clusterrolebinding1:58

    Create a cluster role and a cluster role binding by defining their names and adding get, watch, and list for pods, then verify by listing pods.

  • Get the IP address of a pod1:44

    Use Jsonpath to filter pod details, verify the green pot is running, extract the blue pot's IP address, and save the result for easy verification.

  • Find out the version of the cluster0:45

    Determine the cluster version with kubectl get nodes, see version 1.25.2, and save the output to a text file for upgrading the cluster.

  • Change the mountpath of a container in a statefulset1:48

    Prepare for CKA exam by updating a stateful set's mount path via deleting and recreating it after editing a yaml file and applying kubectl replace, then verify readiness and update.

  • Create a cronjob which prints the date and "Running" every minute2:24

    Create a Kubernetes cronjob that prints the date and Running every minute by copying a YAML example, applying it with kubectl -f, and verifying with kubectl describe.

  • Use JSONPATH and get a list of all the pods awith name and namespace1:48
  • Create a networkpolicy2:13

    Label the namespace, write and save a network policy in YAML, then create the policy from the file to practice Kubernetes networking.

  • Create a pod with container port 802:44

    Learn to create a pod with port 80 and a liveness probe, which restarts the container on failure; save the configuration to a YAML file, verify, and delete the pod.

  • Monitor the logs of a pod1:03

    Monitor the logs of a pod by retrieving logs with kubectl, filter with grep, and save the results to a file for inspection.

  • Rollback a deployment to revision 11:16

    Learn how to rollback a deployment to a previous revision using kubectl rollout history and defining the revision, ensuring stability when deployments crash.

  • List a pod with custom columns1:32

    Inspect pod status and metadata by listing running pods, filter to the orange pod with custom columns, save results to the statistics file, and verify the file content.

  • For a pod, set the CPU memory requests and limits2:32

    Explore resource management in Kubernetes by setting cpu and memory requests and limits for a pod, updating a yaml file, and recreating the pod with kubectl to verify resource changes.

  • Create a pod with a non-persistent storage2:04

    Learn to create a pod with non-persistent storage for logging by defining an empty volume and a volume mount named readers, then verify the pod runs and storage exists.

  • Troubleshoot a failed pod and make it running again2:19

    Troubleshoot a failed pod by checking status, using describe to identify issues, fix a YAML typo, delete the old pod, recreate it from the updated file, and verify it runs.

  • Expose a pod internally and create a test-pod for look-up2:05

    Expose a pod internally and create a test-pod for look-up, enabling internal service access and quick verification to master Kubernetes concepts for the CKA exam.

  • Create a DaemonSet2:24

    Create a daemonset by adapting a deployment YAML, deploy a pod on all nodes, and verify it runs on every node across a three-node cluster.

  • Fix a non-schedulable node2:11

    Learn to diagnose and fix a non-schedulable node by verifying scheduling status, editing the note and pod yaml, redeploying, and confirming successful deployment.

  • Get all the objects in all the namespaces1:02

    Learn to list all objects in a cluster with kubectl get all all namespaces, spotting what's running and what's not, and save the output to a text file.

  • Create a pod and assign it to the node1:52

    Create a pod and assign it to the node by adding node name to yaml file, save as dev.yaml, and verify the pod is deployed on the node mini cube.

  • Find all the pods with a specific label0:53

    Learn to find all pods with a specific label using kubectl get pods, save the output to a label text file, and verify the file.

  • Create a taint on the node1:21

    Apply a taint to a node to block scheduling without tolerations, then use tolerations to allow pods. Verify the minikube node is ready and confirm the taint, key red, NoSchedule.

  • Create a pod and set tolerations2:29

    Learn how to use tolerations to schedule a pod on tainted nodes by inspecting node taints, editing a YAML file, and creating the pod, then verify its node placement.

  • Check the image version of a pod without using the describe command1:09

    Use kubectl with jsonpath to filter the gray pot's image version and check it. Save output to gray image.txt and verify that the image version is 1.14.2.

  • Create a pod with a sidecar container for logging2:04

    Create a pod with a sidecar container for logging by adapting a Kubernetes sidecar example from the documentation, editing the yaml file, deploying with kubectl, and verifying it's running.

  • Find out where the Kubernetes master and KubeDNS are running at0:44

    Find out where the Kubernetes Master and Cube DNS are running by using kubectl cluster info, save the output to info.txt, and verify the results.

  • Print the pod names and start times to a file1:17

    Use jsonpath to extract the start times of all pods with kubectl get pods, define the json path status.startTime, save the output to start text, and verify the result.

  • Create a pod which runs a command and sleeps for 100 seconds1:58

    Create and run a pod with kubectl by defining a YAML file, adding a command that sleeps for 100 seconds, then verify the pod is running and review the logs.

  • Create a pod and specify a CPU request and a CPU limit2:09

    Create a pod with CPU requests and limits by using the documented example, save the configuration to a file, and verify the pod with kubectl create f.

  • Scale a deployment to 5 replicas1:13

    Scale a deployment to five replicas using kubectl, verify the pod count and deployment replicas, and describe the deployment to confirm the update.

  • List all the secrets and configmaps in the cluster in all namespaces1:04

    Learn to enumerate all secrets and configmaps across every namespace using kubectl get with --all-namespaces, save the output to a text file, and verify results.

  • Create a NetworkPolicy which denies all the ingress traffic1:43

    The lecture demonstrates denying all ingress traffic by applying a default deny network policy, creating a policy file with kubectl create f, and verifying the result.

  • Create an init container in a pod2:28

    Create an init container in a pod using a YAML file to run a setup script before the main container starts, then deploy with kubectl and verify.

  • List the logs of the pod and search for the pattern "start"1:03

    Learn to collect logs from pods, verify the dev green pod is running, grab the pod name, search for the pattern 'start', and save and verify the output.

  • Expose the deployment1:34

    Expose a deployment using kubectl expose, verify it is running, and describe the resource to confirm the configuration.

  • Create two pods with different labels1:01

    Create two pods with different labels to practice labeling and verification in a green environment, then verify two pods exist with distinct labels.

  • Create a clusterrole, service account and rolebinding2:33

    Practice creates a cluster role, a service account, and a cluster role binding for deployments. Bind the role to the service account and verify all components.

  • Find the static pod path1:38

    Locate the static pod path by sshing into the minikube node, using ps6 to find the config file, copy it, extract the pod path, and verify.

  • Delete a pod without any delay1:04

    Learn how to quickly delete a pod by using a grace period of zero and force delete. First, check which pods are running, then delete and verify no resources remain.

  • Grep the current context and write it to a file1:16

    Learn to determine your current kubernetes context with kubectl, note the minikube cluster, and save the context output from the config file to a text file for verification.

  • Get a list of all the pods which were recently deleted2:47

    Identify recently deleted pods by tracking events with cube CTL get events, filter results with cut, save output to recent delete text, and verify findings.

  • Troubleshoot the pod and fix the issue2:04

    Troubleshoot a pod crash loop by using kubectl get pods and describe, fix a typo in the yaml, delete and recreate the pod, and verify it runs.

  • Create a pod with a storage which lasts as long as the lifetime of the pod1:30

    Create a pod with non-persistent storage using an emptyDir volume, configure a yaml file with image and name, deploy with kubectl -f, and verify the pod runs.

  • Create a pod and add the "runAsUser" and "fsGroup"1:35

    Create a pod and define a security context with runAsUser and fsGroup to improve privilege and access control. Save the manifest, apply with kubectl -f, and verify.

  • Troubleshoot and fix the kubeconfig file1:38

    Troubleshoot a kubeconfig file by validating cluster pods, identifying host port issues, and correcting the port to 8443, then saving and verifying the config.

  • Create a pod and set "NET_ADMIN"1:44

    Learn to grant the net admin capability in a pod by editing the security context in a yaml file and creating the pod with kubectl.

  • Delete all the pods with a specific label1:01

    Identify all running pods labeled orange, delete those pods, and verify no resources remain afterward.

  • Create a multipod with 3 containers1:45

    Master three-container pod setup by editing and saving a multi-part yaml, deleting and adding resources, then creating the pod with kubectl from a yaml file.

  • Replace a pod with an existing yaml file and verify after1:29

    Replace a pod with a new pod of the same name using a YAML file, verify it's running, and confirm the image updates to 1.16.1 with a describe command.

  • Change the requested storage size of the PersistentVolumeClaim2:09

    Learn to resize an existing persistent volume claim by inspecting persistent volume claims, editing the yaml file to update storage, applying changes with kubectl replace, and verifying the update.

  • Edit an existing pod and add a command1:50

    Edit an existing pod and add a command. Check running pods, save output to a yaml file, modify it, and recreate with kubectl create f to verify with describe.

  • Add a readiness probe to an existing deployment2:19

    Add a readiness probe to an existing deployment, edit the yaml to set the probe with port 80 and a three-attempt success threshold, then redeploy.

  • Get all contexts and write it to a file1:03

    Gather all contexts and write them to a file by examining the config file and running the specified command. Save the output to a text file and verify.

  • Create a replicaset which has 3 replicas2:14

    Create and configure a replica set using a deployment template; edit the yaml to three replicas, remove the strategy, deploy, and verify three pods stay running after deleting one.

  • List all the control plane components and write them to a file0:53

    List all control plane components by running kubectl get pods in the kube-system namespace, save the output to a text file, and verify the results.

Requirements

  • You need a computer or virtual machine
  • You need Minikube or a Kubernetes testing cluster installed
  • You need to use a program to organize your notes like OneNote

Description

Welcome to the Ultimate Practical Kubernetes Course:


“Learn Kubernetes with 100 Questions.


Are you ready to learn about Kubernetes and become a pro? Look no further! In this course, we’ll guide you through 100 hands-on practice questions that cover every aspect of working with Kubernetes. Say goodbye to boring theory and complicated guides. With our course, all you have to do is sit back, relax, and follow the instructor’s easy-to-understand steps to complete the assignments.


Become CKA Certified!


Are you aiming to achieve the prestigious Certified Kubernetes Administrator (CKA) certification? You’re in luck! Our course is an excellent preparation tool for the CKA exam and to learn Kubernetes. We have meticulously crafted practice questions that closely resemble those you’ll encounter in the exam. Moreover, we’ve gone the extra mile to create an immersive experience in our videos, simulating the real exam scenario as closely as possible.


What will you learn?


We’ve got you covered on all the essential topics to make you a Kubernetes expert:


  • Cluster Architecture, Installation & Configuration: Learn how to set up and configure Kubernetes clusters like a pro.

  • Workloads & Scheduling: Understand how to manage and schedule workloads efficiently within Kubernetes.

  • Services & Networking: Master the art of networking and service management in a Kubernetes environment.

  • Storage: Discover the best practices for handling storage in Kubernetes and ensure seamless data management.

  • Troubleshooting: Develop the skills to troubleshoot common issues that may arise in a Kubernetes setup.


Who this course is for:

  • Students who want learn how to use Kubernetes
  • Students who want to pass the CKA exam