Kubernetes and Cloud Native Associate (KCNA) practice questions

230 free questions with answers and explanations.

Practice test
  1. 51.A security team is implementing a strategy to detect and respond to anomalous behavior within running containers in a Kubernetes cluster. They want to identify activities like unauthorized process execution, file system tampering, or unexpected network connections. Which category of security tools is best suited for this type of real-time monitoring and threat detection?Cloud Native Security
  2. 52.An incident response team discovers that a compromised container in their Kubernetes cluster has managed to perform actions outside its intended scope, potentially affecting other containers on the same node. The team wants to understand how the container was initially isolated and what mechanisms could have prevented this lateral movement. Which Linux kernel feature is primarily responsible for isolating processes and resources (like filesystems, network interfaces, and process IDs) between containers?Cloud Native Security
  3. 53.A security auditor is reviewing the access controls for a Kubernetes cluster. They notice that a developer's Kubernetes `Role` grants `create` and `delete` permissions on `Pods` and `Deployments` across all namespaces. This broad access is a violation of which fundamental security principle?Cloud Native Security
  4. 54.A security auditor is reviewing a Kubernetes cluster's network policies. They observe that a critical microservice, running in the 'backend' namespace, needs to accept incoming connections only from pods in the 'frontend' namespace and from a specific external IP range (192.0.2.0/24). All other ingress traffic should be denied. Which NetworkPolicy configuration snippet correctly enforces this requirement?Cloud Native Security
  5. 55.A large enterprise uses multiple Kubernetes clusters across different cloud providers. They need a centralized and consistent way to manage and inject sensitive credentials, such as API keys and database passwords, into their applications without storing them directly in Kubernetes Secrets objects or configuration files. This solution must also integrate with existing enterprise secret stores. Which approach is best suited for this scenario?Cloud Native Security
  6. 56.An organization is deploying a new web application in a Kubernetes cluster. To comply with regulatory requirements, all communication between microservices within the application must be encrypted, and client authentication (mutual TLS) is required. Which cloud-native technology is best suited to implement these security requirements with minimal application code changes?Cloud Native Security
  7. 57.A security auditor is reviewing a Kubernetes cluster's secrets management strategy. They find that all sensitive data, such as API keys and database credentials, are stored directly in Kubernetes Secrets objects. While these are base64 encoded, the auditor highlights a significant security weakness regarding their protection at rest within the `etcd` datastore. What is the primary concern the auditor is likely raising?Cloud Native Security
  8. 58.A financial institution is deploying a sensitive application to a Kubernetes cluster. They need to ensure that all communication between the application's microservices is encrypted and mutually authenticated, even within the same cluster network. Which technology is best suited to achieve this without requiring application-level code changes for encryption?Cloud Native Security
  9. 59.A platform engineering team is setting up a new Kubernetes cluster and needs to implement a custom security policy: all Pods must have a specific security context configured, disallowing privilege escalation and ensuring read-only root filesystems. They want this policy to be automatically enforced for all new Pods, and any Pods failing to meet this standard should be rejected. Which Kubernetes component should they use to achieve this enforcement?Cloud Native Security
  10. 60.A company is adopting a DevSecOps approach and wants to integrate security scanning into their CI/CD pipeline for Kubernetes deployments. They need to scan container images for known vulnerabilities *before* they are pushed to a registry and *before* deployment. Which phase of the software supply chain would this type of scanning primarily fall under?Cloud Native Security
  11. 61.A security engineer is evaluating the effectiveness of their secrets management strategy in Kubernetes. They notice that some applications are still relying on environment variables to consume sensitive data directly from Kubernetes Secrets. While better than hardcoding, this approach has a specific security drawback compared to mounting Secrets as files in a volume. What is this primary drawback?Cloud Native Security
  12. 62.A development team is deploying a new application to a Kubernetes cluster. They want to ensure that all container images used in their deployments originate from an approved, scanned registry and have not been tampered with since being built. Which security control directly addresses this requirement by verifying the integrity and origin of container images before they are allowed to run?Cloud Native Security
  13. 63.A large enterprise is implementing a custom security policy that requires all container images deployed in their Kubernetes clusters to originate from an internal, trusted image registry and be scanned for vulnerabilities within the last 24 hours. This policy needs to be enforced automatically at deployment time. Which Kubernetes extensibility mechanism, often paired with an external policy engine, is best suited to enforce this dynamic, custom policy?Cloud Native Security
  14. 64.A development team is deploying a new microservice to a Kubernetes cluster. They need to ensure that sensitive database credentials are securely managed and only accessible by the specific microservice that requires them, without being hardcoded into the application's container image or configuration files. Which Kubernetes native object is best suited for this requirement?Cloud Native Security
  15. 65.A platform team is configuring Role-Based Access Control (RBAC) for a new developer team in a Kubernetes cluster. The developers need to be able to deploy new Pods, view logs of their own Pods, and update Deployments within their designated namespace. However, they should NOT be able to delete namespaces or modify cluster-wide resources. Which RBAC resource type should the platform team primarily use to define these permissions, and then bind them to the developer's ServiceAccounts or Users?Cloud Native Security
  16. 66.A security engineer is configuring a Kubernetes cluster to enforce strict security policies for all new Pods. They want to ensure that no Pod runs as root, has privileged access, or mounts host paths. This policy must be enforced at the cluster level, preventing non-compliant Pods from even being created. Which Kubernetes feature is designed for this purpose?Cloud Native Security
  17. 67.A security engineer is implementing a strategy to prevent malicious processes from making unexpected system calls within a container. They want to define a whitelist of allowed system calls for specific applications, blocking any calls outside this predefined set. Which Linux security mechanism is specifically designed for this purpose?Cloud Native Security
  18. 68.A platform engineering team is setting up a new Kubernetes cluster and needs to define custom security policies that go beyond standard Pod Security Standards (PSS). Specifically, they want to disallow deployments that use a root filesystem and require all container images to be from a specific internal registry. Which Kubernetes extension point is most suitable for enforcing these custom rules at the point of resource creation or update?Cloud Native Security
  19. 69.A security team is investigating a potential compromise where an attacker gained access to a Kubernetes node and is attempting to extract sensitive data from Pods running on it. They want to ensure that even if an attacker gains control of a node, they cannot easily access the memory or processes of other Pods running on the same node. Which advanced isolation technology could provide an additional layer of defense by running Pods in lightweight virtual machines?Cloud Native Security
  20. 70.A development team is using a GitOps workflow to manage their Kubernetes deployments. They want to ensure that all changes to their cluster configuration, including RBAC roles and network policies, are reviewed, approved, and version-controlled. Which security principle does this practice primarily support?Cloud Native Security
  21. 71.A critical application in a Kubernetes cluster needs to access an external Key Management System (KMS) to retrieve database credentials. The application's Pod should not store the credentials directly, nor should it have long-lived static credentials for the KMS. Which secure method allows the Pod to authenticate to the KMS and fetch secrets dynamically?Cloud Native Security
  22. 72.A platform team is configuring Role-Based Access Control (RBAC) for a new developer team in a Kubernetes cluster. The new team needs to be able to create, view, update, and delete (CRUD) Pods, Deployments, and Services within their designated namespace, 'dev-team-a', but should not be able to manage cluster-wide resources or modify RBAC roles themselves. Which Kubernetes RBAC object should be primarily used to grant these permissions?Cloud Native Security
  23. 73.A security operations team wants to implement a strategy to detect and respond to suspicious activities and potential threats *within* running containers and on Kubernetes nodes. This includes monitoring for unauthorized process execution, file integrity changes, and network anomalies that might indicate a compromise. Which cloud-native security approach is specifically designed to address these concerns?Cloud Native Security
  24. 74.A large enterprise is implementing a new Kubernetes cluster with multiple development teams. Each team requires access to specific cloud provider resources (e.g., S3 buckets, database services) from their applications running in Pods. The security team insists on using a solution that avoids embedding long-lived credentials directly into Pods or container images. Which security pattern should they implement to securely grant Pods access to these external cloud resources?Cloud Native Security
  25. 75.A development team is preparing to deploy a new critical microservice to a production Kubernetes cluster. They are concerned about potential supply chain attacks, specifically the risk of compromised container images. Which security measure should they prioritize to ensure that only trusted and verified container images are deployed?Cloud Native Security
  26. 76.An incident response team is investigating a potential compromise. They suspect an attacker might have gained access to a container and is attempting to move laterally within the cluster by exploiting a vulnerability that allows them to interact with the underlying host kernel. Which Linux kernel feature is designed to restrict the system calls a process can make, thereby mitigating such privilege escalation attempts?Cloud Native Security
  27. 77.An incident response team is investigating a potential compromise where an attacker gained access to a container and is attempting to escalate privileges by exploiting vulnerabilities in the underlying host kernel. They suspect the attacker is trying to break out of the container's isolation. Which Linux kernel mechanism provides the fundamental isolation that prevents a process in one container from seeing or interacting with processes, network interfaces, or filesystems of the host or other containers by default?Cloud Native Security
  28. 78.A security incident response team discovers that a compromised container in their Kubernetes cluster exploited a vulnerability to gain root privileges on the host node. To mitigate this type of attack vector in the future, they want to implement a mechanism that isolates the container's processes and filesystem from the host more effectively, even if the container user is root. Which Linux kernel security feature, often leveraged by container runtimes, provides this enhanced isolation?Cloud Native Security
  29. 79.A security engineer is implementing a secrets management solution for a Kubernetes cluster. The goal is to ensure that application secrets are encrypted at rest, rotated regularly, and only accessible by authorized workloads. Which of the following best describes the principle of 'secrets encryption at rest' in this context?Cloud Native Security
  30. 80.A security engineer is configuring a Kubernetes cluster to enforce strict security policies for all Pods. They want to ensure that Pods cannot run as a privileged user, cannot use host namespaces, and must use a read-only root filesystem. Which Kubernetes security mechanism, configured at the namespace or cluster level, is designed to enforce these kinds of baseline security standards?Cloud Native Security
  31. 81.A large enterprise is modernizing its applications and wants to break down a monolithic system into smaller, independently deployable units. They need to ensure that these new components can be developed, deployed, and scaled autonomously by different teams, communicating via well-defined APIs. Which architectural style is being described?Cloud Native Architecture
  32. 82.A cloud-native application relies on a configuration management system where the desired state of the system is stored in a version-controlled repository. An automated agent continuously observes the actual state of the running system and compares it to the desired state in the repository. If any discrepancies are found, the agent automatically takes action to bring the actual state into alignment with the desired state. What is this automated process called?Cloud Native Architecture
  33. 83.A cloud-native application processes sensitive user data across multiple microservices. The security team requires that all communication between these services is encrypted and mutually authenticated, even within the private network, to prevent unauthorized access and data tampering. Which feature of a service mesh addresses this requirement most effectively?Cloud Native Architecture
  34. 84.A team is developing a new cloud-native application and wants to ensure that internal and external services can communicate securely and reliably, regardless of their underlying network topology or programming language. They also need capabilities like traffic management, policy enforcement, and observability without modifying application code. Which cloud-native component is best suited for this requirement?Cloud Native Architecture
  35. 85.A cloud-native application relies on a configuration management system where desired state is stored in version-controlled Git repositories. An in-cluster agent continuously observes the actual state of the cluster and compares it with the desired state in Git, automatically applying any discrepancies. This 'pull-based' approach, where changes are detected and applied from within the cluster, is a defining characteristic of which operational model?Cloud Native Architecture
  36. 86.A development team is building a new cloud-native application that consists of several independent microservices. They want to ensure that these services can communicate with each other efficiently and securely, regardless of the underlying networking complexities. They also need to implement features like traffic management, policy enforcement, and mutual TLS without modifying the application code. Which architectural component would best fulfill these requirements?Cloud Native Architecture
  37. 87.A cloud-native development team is deploying a new service to Kubernetes. They want to ensure that the application's configuration, such as database connection strings and API keys, is managed securely and separately from the application code. This configuration needs to be injected into the running containers at runtime without rebuilding the Docker image. Which Kubernetes-native object is designed for this purpose?Cloud Native Architecture
  38. 88.A team is developing a highly available, fault-tolerant microservices application. They want to prevent a single failing downstream service from overwhelming an upstream service with continuous requests, which could lead to resource exhaustion and cascading failures. Which resilience pattern should they implement to automatically stop calls to a failing service after a certain threshold?Cloud Native Architecture
  39. 89.A cloud-native application processes sensitive user data across multiple microservices. To meet compliance requirements and enhance security, the development team needs to ensure that all service-to-service communication within the cluster is encrypted and authenticated at the transport layer, without relying on application-level encryption. Which service mesh feature should they enable?Cloud Native Architecture
  40. 90.A team is developing a new cloud-native application using microservices. They want to implement a mechanism that allows them to quickly detect and diagnose issues in their distributed system by tracing requests across multiple services. Which observability practice is most relevant for this requirement?Cloud Native Architecture
  41. 91.A cloud-native application is deployed using a GitOps workflow. The operations team needs to revert the entire application and infrastructure configuration to a previous known good state quickly and reliably after an erroneous change was committed to the Git repository and automatically applied. What is the most effective way to achieve this in a GitOps model?Cloud Native Architecture
  42. 92.A software development team is adopting a GitOps workflow for deploying their Kubernetes applications. They have configured a Git repository as the single source of truth for their application's desired state. What is the primary mechanism that ensures the cluster's actual state converges with the desired state defined in Git?Cloud Native Architecture
  43. 93.A global e-commerce company is migrating its legacy monolithic application to a cloud-native microservices architecture. They need a component that can act as a single entry point for all client requests, handle authentication and authorization, perform request routing to different backend services, and potentially implement rate limiting and caching. Which architectural component fulfills these diverse requirements most comprehensively?Cloud Native Architecture
  44. 94.A financial services company is building a new real-time fraud detection system using a microservices architecture. They need to ensure that transactions are processed quickly and reliably, and that any issues can be identified and resolved without affecting other services. The team plans to use a mechanism to isolate failures and prevent them from cascading across the system. Which pattern is most suitable for this requirement?Cloud Native Architecture
  45. 95.A financial institution is deploying a highly sensitive payment processing microservice. They need to ensure that all traffic between this service and other internal services is encrypted, authenticated, and authorized, without requiring developers to embed complex security logic into each service's code. Which cloud native component can transparently enforce these security policies for inter-service communication?Cloud Native Architecture
  46. 96.A platform team is designing an API Gateway for a suite of financial microservices. They need to ensure that incoming requests are routed to the correct backend service based on the URL path. For example, requests to `/api/v1/accounts` should go to the 'accounts' service, and `/api/v1/transactions` should go to the 'transactions' service. What routing strategy should the API Gateway employ?Cloud Native Architecture
  47. 97.A team is implementing a CI/CD pipeline for their cloud-native application. They want to ensure that every code change undergoes automated testing, code quality checks, and then is automatically deployed to a staging environment for further validation. Only after successful staging tests and manual approval should it proceed to production. Which principle of CI/CD does the 'automated deployment to staging' and 'manual approval for production' part primarily represent?Cloud Native Architecture
  48. 98.A development team is designing a new microservices application where each service is deployed independently. To minimize risk during updates, they want to introduce a new version of a service to a small subset of users before rolling it out to everyone. This allows them to monitor performance and catch issues with minimal impact. Which deployment strategy are they planning to use?Cloud Native Architecture
  49. 99.A development team is implementing a new microservices-based application. They want to ensure that changes to the application's infrastructure and configuration are treated with the same rigor as application code, allowing for version control, automated deployments, and rollbacks. Which cloud native architectural pattern best addresses this requirement?Cloud Native Architecture
  50. 100.A cloud-native application relies on a configuration management system where the desired state of the entire system (infrastructure, applications, and configurations) is declared in Git. An automated process continuously observes the live system's actual state and compares it to the desired state in Git, automatically applying any necessary changes to bring the system into conformance. What is this automated process specifically called?Cloud Native Architecture