Preview a few questions below — answers are revealed when you take the
exam.
-
A team needs to deploy a microservices 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 NodePort Service for external access, and rely on vertical scaling by increasing the resources allocated to each pod.
- Deploy each microservice as a StatefulSet with a single replica, use a ClusterIP Service for internal communication, and implement Vertical Pod Autoscaling based on memory utilization.
- Deploy each microservice as a DaemonSet to ensure pod distribution across all nodes, use an Ingress resource for external access, and implement Cluster Autoscaler to manage node scaling.
-
Consider the situation where a Kubernetes cluster is experiencing high latency in pod scheduling. Which method solves it best?
- Increase the number of nodes in the cluster to provide more resources for scheduling.
- Decrease the number of nodes in the cluster to reduce the scheduling load.
- Implement a custom scheduler that prioritizes pod scheduling based on resource availability.
- Use a third-party scheduling plugin that optimizes pod placement based on node affinity and anti-affinity rules.
-
What strategy should be applied when a Kubernetes cluster needs to be upgraded to a newer version without downtime?
- Use the rolling update feature of kubeadm to upgrade the control plane and worker nodes sequentially while ensuring that the etcd data store is backed up and restored if necessary.
- Drain all worker nodes, upgrade the control plane, and then upgrade the worker nodes one by one while ensuring that the applications are redirected to the upgraded nodes using a load balancer.
- Upgrade the control plane first, then upgrade the worker nodes in a blue-green deployment pattern, and finally switch the traffic to the new version using a canary release strategy.
- Use a third-party tool to automate the upgrade process, ensuring that all components are upgraded in a coordinated manner and that rollback capabilities are available in case of failures.
-
Which configuration is most appropriate for a stateful application that requires persistent storage in a Kubernetes cluster?
- Use PersistentVolumeClaims (PVCs) bound to PersistentVolumes (PVs) with a storage class that supports dynamic provisioning and use StatefulSets to manage the pods.
- Use emptyDir volumes for each pod to store state locally and rely on Kubernetes to handle data persistence across pod restarts.
- Use ConfigMaps to store application state as key-value pairs and mount them as volumes in the pods.
- Use a third-party storage solution that integrates with Kubernetes and provides automated backup and restore capabilities.
-
What is the best troubleshooting action when a Kubernetes pod is in a CrashLoopBackOff state?
- Check the pod's events and logs to identify the cause of the crash, fix the issue in the application or configuration, and then delete the pod to allow Kubernetes to recreate it.
- Increase the resources allocated to the pod to prevent it from crashing due to resource constraints.
- Use kubectl describe pod to get detailed information about the pod's status and configuration, and then apply a patch to the pod's spec to resolve the issue.
- Scale down the Deployment to reduce the number of pods and then scale it back up to trigger a rolling update that might resolve the issue.