Sample Questions from Certified Kubernetes Application Developer (CKAD)

Preview a few questions below — answers are revealed when you take the exam.

  1. A team needs to deploy a microservices-based application on Kubernetes. The application requires high availability and scalability. What approach should they take to ensure these requirements are met?

    • Deploy each microservice as a separate Kubernetes Deployment with multiple replicas, use a Service of type LoadBalancer for external access, and implement Horizontal Pod Autoscaling based on CPU utilization.
    • Deploy all microservices within a single Kubernetes Deployment, use a Service of type ClusterIP for internal communication, and rely on manual scaling based on observed traffic patterns.
    • Deploy each microservice as a StatefulSet with a single replica, use a Service of type NodePort for external access, and implement Vertical Pod Autoscaling based on memory utilization.
    • Deploy each microservice as a DaemonSet to ensure pod distribution across all nodes, use a Service of type ExternalName for external access, and implement custom scaling scripts based on custom metrics.
  2. Identify the command to create a Kubernetes ConfigMap from a file named config.yaml.

    • kubectl create configmap config --from-file=config.yaml
    • kubectl apply configmap config --from-file=config.yaml
    • kubectl create configmap config --from-literal=config.yaml
    • kubectl apply configmap config --from-literal=config.yaml
  3. Consider the situation where a Kubernetes pod is frequently crashing due to out-of-memory errors. Which method solves it best?

    • Increase the memory limits and requests for the container in the pod's resource configuration.
    • Delete the pod and let Kubernetes automatically recreate it with default resource settings.
    • Add a new node to the cluster to distribute the load and reduce memory pressure on existing nodes.
    • Implement a custom script to monitor memory usage and manually adjust resource limits as needed.
  4. What strategy should be applied when designing a Kubernetes application to ensure it can handle sudden traffic spikes without manual intervention?

    • Implement Horizontal Pod Autoscaling (HPA) based on CPU or custom metrics to automatically scale the number of pod replicas.
    • Manually scale the number of pod replicas based on observed traffic patterns and historical data.
    • Use a fixed number of pod replicas and rely on Kubernetes' self-healing mechanisms to handle increased load.
    • Implement Vertical Pod Autoscaling (VPA) to automatically adjust the resource limits and requests for each pod.
  5. Which configuration is most appropriate for a stateful application that requires persistent storage in Kubernetes?

    • Use a StatefulSet with PersistentVolumeClaims (PVCs) to ensure each pod gets a unique, stable network identity and persistent storage.
    • Deploy the application as a Deployment with emptyDir volumes for storage, which are ephemeral and tied to the pod's lifecycle.
    • Use a DaemonSet with hostPath volumes for storage, which are tied to the node's filesystem and not portable across nodes.
    • Deploy the application as a Job with a single pod that uses a PersistentVolume (PV) for storage, which is not designed for long-running applications.