All Linux Foundation / CNCF exams
Free CNPE practice test: 30 questions with answers
30 original questions for Certified Cloud Native Platform Engineer, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 CNPE questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Kubernetes operations (4 questions)
Question 1
A platform team wants a Deployment to keep a fixed number of Pods running even when a node fails. Which Kubernetes controller behaviour provides this?
- AThe kubelet on each node schedules new Pods across the cluster
- BThe kube-proxy rewrites Service rules
- CThe ReplicaSet controller reconciles the desired replica count
- DThe etcd snapshot job copies Pod specs
Show answer and explanationHide answer
Correct answer: CA Deployment manages ReplicaSets, which reconcile the desired replica count. The kubelet runs Pods on its own node, kube-proxy handles Service networking, and etcd snapshots do not schedule Pods.
Question 2
A namespace-scoped team needs read access to Pods in its own namespace only. Which Kubernetes object expresses this permission?
- AA ClusterRole bound cluster-wide with a ClusterRoleBinding
- BA NetworkPolicy allowing ingress to Pods
- CA ConfigMap containing the team's credentials
- DA Role bound to the team with a RoleBinding
Show answer and explanationHide answer
Correct answer: DA Role with a RoleBinding grants permissions limited to one namespace. A cluster-wide binding grants more than needed, NetworkPolicies control traffic rather than API access, and ConfigMaps do not grant permissions.
Question 3
A Pod keeps restarting because its container exceeds its memory limit. Which field should the platform team inspect first?
- AThe Pod's labels and annotations only, reviewed alongside node taints
- BThe container's resources.limits.memory setting and the termination reason
- CThe Service's session affinity and load-balancing algorithm, which spreads client connections
- DThe namespace's display name and description annotation shown in dashboards
Show answer and explanationHide answer
Correct answer: BChecking the memory limit and the termination reason, such as OOMKilled, identifies the cause. Labels, session affinity and display names do not affect memory termination.
Question 4
A team needs to ensure that Pods are spread across availability zones so that a single zone failure does not take down the whole service. Which scheduling feature addresses this?
- APod disruption budgets alone
- BIncreasing the log retention period
- CA larger container image
- DTopology spread constraints
Show answer and explanationHide answer
Correct answer: DTopology spread constraints distribute Pods across zones or other topology domains. A disruption budget limits voluntary evictions, image size is unrelated, and log retention does not affect placement.
Observability (4 questions)
Question 5
Which three pillars are commonly used to describe observability data?
- AServers, routers and switches
- BMetrics, logs and traces
- CUsers, roles and groups
- DImages, containers and volumes
Show answer and explanationHide answer
Correct answer: BMetrics, logs and traces are the core observability signals. Hardware, container artifacts and identity objects are infrastructure or access concepts.
Question 6
A platform team wants to measure the reliability of a service from the user's perspective. Which concept best fits?
- AThe size of the container registry image layers stored
- BThe number of lines of code in the service repository
- CThe number of engineers on the team who hold on-call rotations
- DService level indicators and objectives based on user-facing requests
Show answer and explanationHide answer
Correct answer: DSLIs and SLOs measure reliability from the user's perspective. Code size, team size and registry size do not measure user experience.
Question 7
Distributed tracing helps a platform team identify which component in a request path causes latency. What does a trace record?
- AThe total disk usage of each node and the volume mounts attached to every container
- BThe developer's keyboard layout and preferred IDE theme settings stored locally
- CThe list of installed packages on each image and the base layer digest for every build
- DThe timing and relationships of spans as a request moves across services
Show answer and explanationHide answer
Correct answer: DTraces record spans with timing and parent-child relationships across services. Disk usage, package lists and keyboard layouts are not trace data.
Question 8
Which two practices make alerting more useful for on-call engineers? (Choose two.)
- AInclude a link to a runbook in the alert
- BAlert on every single log line that contains the word error
- CSend all alerts to a shared inbox with no owner
- DAlert on symptoms that affect users, such as SLO burn rate
- ESet thresholds so low that alerts fire constantly
Show answer and explanationHide answer
Correct answer: A, DSymptom-based alerts such as SLO burn rate and runbook links make alerts actionable. Alerting on every error log, unowned inboxes and constant noise lead to fatigue and missed issues.
Security and policy (4 questions)
Question 9
Which approach enforces a rule such as 'all containers must run as non-root' for every workload admitted to a cluster?
- AA monthly manual spreadsheet review of container securityContext fields
- BA policy engine running as an admission controller, such as Kyverno or OPA Gatekeeper
- CA comment in the application code reminding developers to set runAsNonRoot
- DRelying on each developer to remember the rule when writing new manifests
Show answer and explanationHide answer
Correct answer: BA policy engine as an admission controller enforces rules on every admitted workload. Spreadsheets, comments and memory are not enforcement mechanisms.
Question 10
A team stores database passwords in a Kubernetes Secret. Which additional practice reduces the risk of exposure?
- ARestrict access with RBAC and encrypt Secrets at rest
- BPrint the decoded Secret value in CI build logs
- CShare the Secret in a team chat channel for review
- DPush the Secret manifest to a public repository
Show answer and explanationHide answer
Correct answer: ARBAC restricts who can read Secrets and encryption at rest protects them in etcd. Public commits, log output and chat sharing expose them.
Question 11
Which principle is most important when designing platform access for many application teams?
- AShared credentials for several teams stored in one common vault and reused
- BFull administrator access for every team to avoid delays
- CLeast privilege, granting only the permissions each team needs
- DUnlimited access to production data, including customer records and backups
Show answer and explanationHide answer
Correct answer: CLeast privilege limits access to what each team needs. Universal administrator access, shared credentials and unlimited production access all expand risk.
Question 12
A supply chain security requirement asks teams to prove that a container image was built from an approved source. Which practice addresses this?
- AImage signing and provenance attestations verified before deployment
- BUsing the latest tag for each release candidate build
- CRenaming images to a shorter name to save registry storage
- DDisabling image scanning in the pipeline to save build minutes
Show answer and explanationHide answer
Correct answer: ASignatures and provenance attestations verified before deployment prove the origin of an image. Renaming, using latest tags and disabling scanning do not provide that proof.
Platform fundamentals (4 questions)
Question 13
A platform team wants to reduce the cognitive load on application developers. Which goal best describes the purpose of an internal developer platform?
- ARequire every application team to provision and operate its own dedicated Kubernetes cluster from scratch
- BReplace application development teams with dedicated platform engineers who take over writing, testing and releasing services in production
- CProvide self-service, paved paths so developers can deliver software without needing deep infrastructure expertise
- DCentralize application source code, build pipelines and deployment manifests in one shared monorepo that teams commit to directly
Show answer and explanationHide answer
Correct answer: CAn internal developer platform offers self-service paved paths that reduce cognitive load. Replacing teams, per-team clusters and a single repository do not describe the platform's purpose.
Question 14
Which term describes a standard, well-supported route that a team can follow to build, deploy and operate a common type of application?
- AGolden path
- BSingle point of failure
- CTechnical debt register
- DShadow IT
Show answer and explanationHide answer
Correct answer: AA golden path is a supported, opinionated route for a common workload. A single point of failure is a reliability risk, shadow IT is unsanctioned tooling, and a debt register records known problems.
Question 15
Which two outcomes indicate a platform is delivering value to application teams? (Choose two.)
- AThe platform team has the largest budget in the company
- BLead time for changes decreases over time
- CEvery team uses a different deployment method
- DDevelopers need to learn every underlying cloud API
- ETeams can provision standard environments without filing manual tickets
Show answer and explanationHide answer
Correct answer: B, ESelf-service provisioning and shorter lead times are signs of platform value. Budget size, fragmented deployment methods and developers needing every cloud API are not indicators of value.
Question 16
A platform team measures its success by how quickly application teams can ship safely. Which metric family is most directly relevant?
- ANumber of platform features shipped regardless of adoption by application teams
- BDelivery performance metrics such as deployment frequency and lead time for changes
- CNumber of bare-metal servers and virtual machines owned by the platform team
- DVolume of internal documentation pages written each sprint for the team wiki
Show answer and explanationHide answer
Correct answer: BDeployment frequency and lead time for changes measure how quickly teams deliver safely. Feature counts regardless of use, server counts and documentation volume do not measure delivery outcomes.
Infrastructure as code (3 questions)
Question 17
Which property makes an infrastructure-as-code definition idempotent?
- AApplying it repeatedly produces the same end state without duplicating resources
- BEach run creates a new copy of every resource, leaving duplicate instances untracked by state
- CIt is applied once per environment, because a second apply would conflict with the existing state
- DIt requires manual approval steps and console clicks between each run in production
Show answer and explanationHide answer
Correct answer: AIdempotence means repeated application converges to the same state without duplicating resources. Creating new copies, one-time application and manual steps are the opposite of idempotence.
Question 18
A team stores its Terraform state file locally on one engineer's laptop. What is the main risk?
- AFaster provisioning times, because local state lets the apply skip the remote lock and the refresh
- BBetter naming consistency across teams, because the provider enforces resource names in state
- CLoss of the state, concurrent changes, and exposure of sensitive values in the state
- DAutomatic backups of every resource stored in the cloud provider's snapshot
Show answer and explanationHide answer
Correct answer: CLocal state can be lost, causes conflicts when several people apply changes, and may contain sensitive values. It does not speed provisioning or provide backups or naming consistency.
Question 19
Which practice helps prevent accidental deletion of a critical production database managed by infrastructure as code?
- ADeleting the state file regularly so each plan starts from a clean baseline snapshot
- BProtective settings such as deletion protection plus review of destructive plan changes
- CRunning every change directly in production without a plan, applying with auto-approve to skip plan review
- DGranting every engineer full administrator rights on the production cloud account
Show answer and explanationHide answer
Correct answer: BDeletion protection and review of destructive plan changes guard against accidental loss. Deleting state, unplanned production changes and broad administrator rights all increase risk.
GitOps and delivery (3 questions)
Question 20
In a GitOps workflow, what is the role of a reconciliation controller such as Argo CD or Flux?
- AWrite application source code on behalf of developers during feature builds
- BReplace the container registry by pulling images directly from Git commits
- CStore secrets in plain text in the repository as unencrypted YAML values
- DContinuously compare the desired state in Git with the live cluster and correct drift
Show answer and explanationHide answer
Correct answer: DGitOps controllers continuously reconcile the live cluster with the desired state stored in Git. They do not write application code, replace registries, or store plain-text secrets.
Question 21
A platform team wants changes to production to be made only through pull requests that are reviewed and recorded. Which practice does this describe?
- AManual kubectl edits applied directly on production nodes during an outage
- BUnversioned configuration files kept on engineers' laptops and emailed
- CDeclarative configuration with an audit trail in version control
- DShared administrator passwords stored in a team wiki page
Show answer and explanationHide answer
Correct answer: CDeclarative configuration in version control, changed through reviewed pull requests, gives an audit trail. Manual edits, shared passwords and unversioned files remove that control.
Question 22
Which two statements about GitOps are correct? (Choose two.)
- AGit must contain plain-text production secrets for GitOps to work
- BGitOps eliminates the need for code review
- CGitOps requires developers to apply changes with kubectl edit
- DManual changes made directly to the cluster are reverted by the reconciler when they drift
- EThe desired state is declared in version control and reconciled to the cluster
Show answer and explanationHide answer
Correct answer: D, EGitOps declares desired state in Git and reconciles the cluster to it, which reverts drift. Plain-text secrets are not required, code review remains valuable, and kubectl edits bypass the model.
CI/CD (3 questions)
Question 23
A pipeline builds an image once and promotes the same image digest through staging to production. Why is this preferred?
- AIt ensures the tested artifact is the exact artifact deployed, which improves traceability
- BIt guarantees the image contains no known vulnerabilities after scanning
- CIt removes the need for unit and integration tests in the build pipeline
- DIt makes builds slower, which improves quality because each rebuild adds delay
Show answer and explanationHide answer
Correct answer: APromoting the same immutable artifact means the tested image is the deployed image, which improves traceability. Slowness is not a quality goal, tests remain necessary, and promotion does not guarantee a vulnerability-free image.
Question 24
Which practice reduces the blast radius of a faulty release to production?
- AProgressive delivery such as canary releases with automated rollback on error signals
- BDisabling liveness and readiness health checks to speed up rollout across the whole cluster
- CSkipping intermediate versions during the rollout to avoid staged database migration checks
- DDeploying every change to every region at the same moment without a staged rollout or rollback plan
Show answer and explanationHide answer
Correct answer: ACanary releases with automated rollback limit exposure to a faulty change. Simultaneous global rollout, disabled health checks and skipping versions increase the blast radius or hide problems.
Question 25
A pipeline runs the same test suite on every commit. Which property of the test suite is most important for trustworthy pipelines?
- ATests are reliable and deterministic, so a failure indicates a real problem
- BTests should take as long as possible to catch rare and subtle faults
- CTests are written to pass unconditionally, so builds stay green regardless of the code
- DTests are executed once a year during a scheduled release freeze window, with results archived
Show answer and explanationHide answer
Correct answer: AReliable, deterministic tests make a failure meaningful. Long tests, always-passing tests and annual runs make the pipeline less useful.
Platform APIs and abstractions (3 questions)
Question 26
A platform team wants to offer a database to developers without exposing cloud provider details. Which mechanism supports this?
- AGiving developers the cloud provider's root account credentials with console and CLI access
- BA custom resource that a control plane reconciles into the underlying cloud resources
- CAsking developers to create databases manually in the console each time
- DHard-coding database connection strings in container images at build time
Show answer and explanationHide answer
Correct answer: BA custom resource reconciled by a control plane, as in Crossplane-style abstractions, hides provider details behind a simple API. Root access, manual console work and hard-coded strings do not provide that abstraction.
Question 27
Which benefit is most associated with a software catalogue in a developer portal?
- ADiscovering services, their owners, documentation and dependencies in one place
- BStoring production database passwords and API tokens in plain catalogue entries for each service
- CReplacing the source control system with a developer portal's built-in file editor
- DAutomatically rewriting application code across deployment pipeline stages
Show answer and explanationHide answer
Correct answer: AA software catalogue helps developers find services, owners, docs and dependencies. It does not replace source control, store production passwords, or rewrite code.
Question 28
A platform team wants developers to request a complete environment with one declarative resource that the platform expands into several underlying resources. Which concept describes this?
- AA manual runbook that operators follow with copy-paste steps
- BComposition of resources behind a higher-level API
- CA shared team spreadsheet that records assigned IP addresses
- DA single hard-coded virtual machine image with fixed IPs
Show answer and explanationHide answer
Correct answer: BComposition exposes a higher-level API that expands into several underlying resources. Manual runbooks, spreadsheets and a single hard-coded machine do not provide a declarative abstraction.
Reliability (2 questions)
Question 29
A team defines an error budget for its service. What does the error budget express?
- AThe amount of unreliability the SLO allows over a period before reliability work takes priority
- BThe total money allocated for errors in the cloud bill, which finance reconciles against monthly infrastructure costs
- CThe number of bugs the team may introduce into production each week before the next release review takes place
- DThe number of incidents the team is allowed to leave unreviewed during each quarter
Show answer and explanationHide answer
Correct answer: AAn error budget is the unreliability an SLO allows, and when it is spent, reliability work takes priority. It is not a cloud cost, a bug quota, or permission to ignore incidents.
Question 30
A team is designing for resilience. Which practice helps a service continue working when a dependency becomes slow?
- AUnlimited retries with no timeout, retried in a tight loop against the dependency
- BSend every request to the slow dependency in parallel without a cap
- CTimeouts, retries with backoff, and circuit breaking for that dependency
- DRemoving error handling so that failed calls are treated as successful responses
Show answer and explanationHide answer
Correct answer: CTimeouts, backed-off retries and circuit breakers protect a service from a slow dependency. Unlimited retries and parallel floods worsen the slowdown, and removing error handling makes failures worse.