Kubernetes and Cloud Native Associate (KCNA) practice questions

230 free questions with answers and explanations.

Practice test
  1. 101.A financial services company is building a new real-time fraud detection system using a microservices architecture. Due to the critical nature of the service, they need to ensure that the failure of one microservice does not cascade and bring down the entire system. They want to isolate resources and limit the impact of failures. Which resilience pattern should they implement?Cloud Native Architecture
  2. 102.A development team is implementing a CI/CD pipeline for their cloud-native application. They want to ensure that every code change that passes automated tests is automatically deployed to a staging environment, but requires a manual approval step before deployment to production. Which CI/CD practice does this scenario best describe?Cloud Native Architecture
  3. 103.A team is developing a new cloud-native application that consists of several independent microservices. They want to ensure that these services can communicate with each other securely and reliably, without requiring each developer to implement complex networking and security logic within their service code. Which architectural component would best address these concerns?Cloud Native Architecture
  4. 104.A global e-commerce company is migrating its legacy monolithic application to a cloud-native microservices architecture. They need a centralized entry point for all external clients to access their various backend services, handle authentication, rate limiting, and request routing across multiple services. Which cloud-native component is designed for this purpose?Cloud Native Architecture
  5. 105.A development team is implementing a new cloud-native application that uses multiple microservices. They want to ensure that all changes to the application's infrastructure and configuration are version-controlled, auditable, and can be automatically applied to the production environment. Which cloud-native architectural pattern best supports these requirements?Cloud Native Architecture
  6. 106.A startup is building a new application and wants to minimize operational overhead for managing the underlying infrastructure, focusing solely on writing code. They anticipate highly variable traffic patterns, requiring automatic scaling up and down to handle demand spikes and lulls. Which cloud-native compute model would be most suitable for this scenario?Cloud Native Architecture
  7. 107.A cloud-native development team is deploying a new service to Kubernetes. They want to ensure that application configuration data, such as database connection strings or feature flags, is decoupled from the application code and can be easily updated without rebuilding the container image. Which Kubernetes object is best suited for storing non-sensitive configuration data?Cloud Native Architecture
  8. 108.A platform team is designing an API Gateway for a suite of financial microservices. They need to implement rate limiting, authentication, and request routing based on the URL path, all before requests reach the individual backend services. Which feature of an API Gateway directly enables dynamic request routing to different services based on the incoming request's path?Cloud Native Architecture
  9. 109.A software development team wants to automate the process of building, testing, and deploying their cloud-native application. They aim for frequent, small releases and want to ensure that every code change that passes automated tests is automatically released to a production-like environment. What practice are they implementing?Cloud Native Architecture
  10. 110.A team is designing a highly available, fault-tolerant microservices application. They want to ensure that even if a critical database service experiences a temporary outage, the dependent services do not crash or become unresponsive indefinitely, but instead gracefully degrade or retry later. Which resilience pattern is most appropriate for preventing cascading failures in this scenario?Cloud Native Architecture
  11. 111.A development team is designing a new microservices application where each service is deployed in its own container. They want to ensure that new deployments of a service can be tested with a small percentage of live traffic before fully rolling out to all users, allowing for quick rollback if issues are detected. Which deployment strategy is most appropriate for this scenario?Cloud Native Architecture
  12. 112.A cloud-native application relies on a configuration management system where the desired state of the entire system (infrastructure and applications) is stored in a Git repository. An automated process continuously observes the actual state of the running system and automatically reconciles any deviations from the desired state defined in Git. This approach ensures that all changes are auditable and reversible. Which operational framework does this scenario describe?Cloud Native Architecture
  13. 113.A cloud-native application uses several microservices, each deployed as a container. To improve resource utilization and ensure high availability, these containers are orchestrated across a cluster of virtual machines. Which core cloud-native architecture component is responsible for managing and automating the deployment, scaling, and operation of these containerized applications?Cloud Native Architecture
  14. 114.A development team is implementing a new cloud-native application and wants to ensure that all changes to the infrastructure and application configuration are trackable, auditable, and reversible. They decide to adopt a practice where the desired state of the system is declared in a version-controlled repository, and automated processes continuously reconcile the live state with this declared state. Which cloud-native architecture principle are they adopting?Cloud Native Architecture
  15. 115.A team is developing a new cloud-native application using microservices. They want to implement a system that automatically scales their services up or down based on demand, without manually provisioning or managing servers. They also want to pay only for the compute resources consumed during execution. Which cloud-native architectural style best describes this approach?Cloud Native Architecture
  16. 116.A team is developing a new cloud-native application using microservices. They want to implement a robust monitoring solution that provides deep insights into the behavior of individual requests as they traverse multiple services. This includes tracking latency, errors, and the path a request takes through the system. Which observability technique is best suited for this requirement?Cloud Native Architecture
  17. 117.A company is migrating its monolithic application to a microservices architecture. They need a way to manage cross-cutting concerns like traffic management, security, and observability for inter-service communication without modifying the application code itself. Which cloud native component is best suited for this purpose?Cloud Native Architecture
  18. 118.A cloud-native application is deployed using a GitOps workflow. The operations team needs to roll back a recent deployment to a previous stable version after an unexpected critical bug was discovered in production. How would they typically initiate this rollback within a GitOps framework?Cloud Native Architecture
  19. 119.A startup is building a new application and wants to minimize operational overhead for managing servers and scaling infrastructure, while only paying for the compute resources consumed during actual code execution. Which cloud native architectural paradigm aligns best with these goals?Cloud Native Architecture
  20. 120.A cloud-native application consists of several independent microservices. The development team needs a way to gain insights into the application's behavior and performance by collecting metrics (e.g., CPU usage, request latency), logs (e.g., error messages), and traces (e.g., end-to-end request flow) from all these services. Which overarching cloud-native principle encompasses these capabilities?Cloud Native Architecture
  21. 121.A junior administrator is examining a Kubernetes YAML file for a Pod and sees the following snippet: ```yaml apiVersion: v1 kind: Pod metadata: name: my-app-pod spec: containers: - name: my-app-container image: nginx:latest ports: - containerPort: 80 hostPort: 8080 ``` What is the primary effect of `hostPort: 8080` in this Pod definition?Kubernetes Fundamentals
  22. 122.A team is developing a new cloud-native application and needs to define the desired state for their application's Pods, including the container image, resource limits, and the number of replicas. They also require automatic rollouts and rollbacks for updates. Which Kubernetes API object should they use to achieve this?Kubernetes Fundamentals
  23. 123.A platform engineer wants to understand the current state of all Pods across a Kubernetes cluster, including their status, IP addresses, and the node they are running on. Which `kubectl` command, when executed without additional arguments, provides a concise summary of these details for all Pods?Kubernetes Fundamentals
  24. 124.A system administrator needs to retrieve the current logs for a specific Pod named 'my-app-pod-xyz' in the 'default' namespace to diagnose an issue. Which `kubectl` command should they use?Kubernetes Fundamentals
  25. 125.A network engineer wants to expose a web application running in a Kubernetes cluster to external internet traffic. The application is served by multiple Pods, and traffic needs to be load-balanced across them. Which Kubernetes object is specifically designed to provide stable external network access and load balancing for a set of Pods?Kubernetes Fundamentals
  26. 126.An application developer has created a YAML manifest for a Kubernetes Deployment. They need to ensure that their application's Pods are always running on nodes with at least 4GB of RAM and have access to a GPU. Which section of the Pod specification within the Deployment YAML would be used to define these requirements?Kubernetes Fundamentals
  27. 127.A cluster administrator is troubleshooting network connectivity for a web application running in a Kubernetes cluster. The application is exposed via a NodePort Service. They notice that requests to the application are timing out. After checking the Pods, they confirm the application is running correctly within the Pods. Which of the following is the most likely cause of the connectivity issue?Kubernetes Fundamentals
  28. 128.A security auditor is reviewing a Kubernetes cluster and wants to understand how sensitive information, such as database credentials or API keys, is stored and managed securely. Which Kubernetes object is designed specifically for storing and managing such sensitive data?Kubernetes Fundamentals
  29. 129.A developer needs to deploy a simple web application to a Kubernetes cluster. The application consists of a single container image and should be accessible internally within the cluster. Which Kubernetes object is the most fundamental and direct way to run this single container?Kubernetes Fundamentals
  30. 130.A DevOps team is managing a Kubernetes cluster and wants to isolate different environments (e.g., development, staging, production) within the same physical cluster to prevent resource conflicts and accidental cross-environment access. Which Kubernetes object is specifically designed for this purpose?Kubernetes Fundamentals
  31. 131.A cluster operator is observing high CPU utilization on the Kubernetes control plane. Upon investigation, they find that `kube-apiserver` is under significant load. Which of the following components is primarily responsible for exposing the Kubernetes API and is the front-end for the control plane?Kubernetes Fundamentals
  32. 132.An engineer is deploying a new microservice that requires persistent storage. The application needs to store user-uploaded files that must survive Pod restarts and rescheduling. Which Kubernetes object is primarily responsible for requesting and consuming persistent storage within a cluster?Kubernetes Fundamentals
  33. 133.A system administrator observes that their Kubernetes cluster's CPU utilization frequently spikes unexpectedly, but they lack historical context to understand the pattern or root cause. Which component of the Prometheus ecosystem would best help them visualize this historical data and identify trends?Cloud Native Observability
  34. 134.A security operations center (SOC) team needs to audit all administrative actions performed within their Kubernetes cluster, including who made changes, when, and from where. This data is critical for compliance and forensic analysis. Which specific type of log within Kubernetes provides this granular information about API server requests?Cloud Native Observability
  35. 135.A platform team is observing high cardinality metrics in their Prometheus setup, leading to increased storage consumption and slower query performance. Which best practice or tool can help manage this issue by reducing the number of unique label combinations while retaining critical information?Cloud Native Observability
  36. 136.A developer needs to instrument their new Go application to emit metrics, logs, and traces in a vendor-agnostic format, allowing them to switch observability backends (e.g., Prometheus, Jaeger, Elasticsearch) without modifying application code. Which CNCF project provides a set of APIs, SDKs, and tools for this purpose?Cloud Native Observability
  37. 137.A company is migrating its monolithic application to a microservices architecture on Kubernetes. They are experiencing increased latency and errors, but it's difficult to pinpoint which specific service or interaction is causing the problem. Which observability strategy would be most effective in identifying the exact path a request takes through the multiple services and the time spent in each?Cloud Native Observability
  38. 138.A cloud-native application is experiencing high latency in one of its critical API endpoints. Developers suspect the issue might be due to a specific section of code within a microservice that is consuming excessive CPU cycles or memory. Which specialized observability technique, when applied to the microservice, would provide detailed insights into the runtime behavior of the code, identifying hot spots and resource bottlenecks at a function level?Cloud Native Observability
  39. 139.A client is running a mission-critical financial application on Kubernetes. They require an observability strategy that ensures an immediate response to any deviation from normal behavior, even subtle ones, to prevent service disruptions. This necessitates defining clear thresholds for key metrics and automatically notifying responsible teams when these thresholds are breached. Which observability practice is being described?Cloud Native Observability
  40. 140.A developer needs to add custom metrics to their Go application running in Kubernetes. These metrics should track specific business logic events, such as the number of successful user sign-ups or failed payment transactions. The target monitoring system is Prometheus. Which Prometheus client library feature should the developer use to expose these application-specific metrics?Cloud Native Observability
  41. 141.A cloud-native application uses an event-driven architecture, where messages are passed between services via a message queue. When an issue occurs, it's critical to determine if a message was successfully processed by all downstream services or if it got lost/stuck at an intermediary step. Which type of observability data is best suited to track the full lifecycle of a single message through this asynchronous flow?Cloud Native Observability
  42. 142.An incident response team receives an alert about high error rates in a critical microservice. To quickly understand the context of these errors, they need to correlate the alert with detailed log messages associated with the failing requests. Which component of the observability stack is primarily responsible for storing and indexing these detailed log messages to enable efficient searching and analysis?Cloud Native Observability
  43. 143.A SRE team is alerted about a sudden spike in error rates for a critical microservice. They need to quickly determine if the errors are localized to a specific version of the service, a particular Kubernetes node, or if they are impacting all instances. Which observability tool or practice would provide the most efficient way to correlate these error events with specific attributes like service version, host, or pod name?Cloud Native Observability
  44. 144.A cybersecurity team needs to monitor all network traffic entering and leaving their Kubernetes cluster for suspicious activity. They are looking for a solution that can capture and analyze packet-level information from the network interfaces of their nodes. Which type of observability tool is most appropriate for this requirement?Cloud Native Observability
  45. 145.A team is investigating an incident where a microservice intermittently fails to respond. They have logs and metrics, but they need to understand the sequence of operations within the service's code during a failing request, specifically which internal functions were called and how long each took. Which advanced observability technique would provide this granular, in-code visibility?Cloud Native Observability
  46. 146.A team is managing a Kubernetes cluster with several stateless microservices. They want to set up an effective monitoring system that adheres to the 'four golden signals' of monitoring: Latency, Traffic, Errors, and Saturation. For a typical HTTP-based microservice, which metric would best represent 'Traffic'?Cloud Native Observability
  47. 147.A DevOps team needs to collect and centralize logs from various Kubernetes pods and nodes for later analysis and troubleshooting. They require a lightweight, extensible, and efficient log forwarder that can send logs to multiple destinations, including Elasticsearch. Which tool is specifically designed for this purpose, acting as a universal log collector?Cloud Native Observability
  48. 148.An infrastructure team needs to ensure that their critical Kubernetes services remain operational even if a single data center fails. They have deployed their applications across multiple geographically dispersed clusters. Which monitoring strategy is essential to provide a unified view of the application's health across all clusters and automatically trigger failover mechanisms when a regional outage occurs?Cloud Native Observability
  49. 149.A large e-commerce company operates multiple Kubernetes clusters across different geographical regions. They need to aggregate and analyze metrics from all these clusters into a single, unified view to enable global monitoring and correlation. However, they are concerned about the high cardinality of certain metrics (e.g., user IDs, session IDs) from their services, which could overwhelm their Prometheus instances in each cluster. Which Prometheus-ecosystem component is designed to handle high-cardinality metrics and long-term storage across multiple clusters efficiently?Cloud Native Observability
  50. 150.A client is managing a critical e-commerce application on Kubernetes, experiencing intermittent slowdowns. They need to visualize the performance of individual microservices, track request latency, and identify bottlenecks in the request flow across different services. Which observability tool is best suited for providing a visual representation of request propagation and timing through a distributed system?Cloud Native Observability