Correct Answer: To package an application with its dependencies
Explanation:
Containerization packages an application and its required dependencies into a portable, isolated unit.
Incorrect! Try again.
2What is Docker primarily used for?
Containerization with Docker
Easy
A.Writing operating system kernels
B.Designing relational databases
C.Creating and running containers
D.Managing physical network cables
Correct Answer: Creating and running containers
Explanation:
Docker provides tools for building, distributing, and running applications in containers.
Incorrect! Try again.
3What is a running instance of a Docker image called?
Containerization with Docker
Easy
A.A container
B.A cluster
C.A volume
D.A repository
Correct Answer: A container
Explanation:
A container is a running instance created from a Docker image.
Incorrect! Try again.
4Which Docker command builds an image from a Dockerfile in the current directory?
Dockerfile and container image creation
Easy
A.docker pull .
B.docker stop .
C.docker run .
D.docker build .
Correct Answer: docker build .
Explanation:
The docker build . command builds an image using the Dockerfile and context in the current directory.
Incorrect! Try again.
5Which Dockerfile instruction specifies the base image?
Dockerfile and container image creation
Easy
A.CMD
B.RUN
C.FROM
D.COPY
Correct Answer: FROM
Explanation:
The FROM instruction defines the base image used to build a new container image.
Incorrect! Try again.
6Which Dockerfile instruction copies files from the build context into an image?
Dockerfile and container image creation
Easy
A.COPY
B.EXPOSE
C.ENTRYPOINT
D.WORKDIR
Correct Answer: COPY
Explanation:
The COPY instruction adds files or directories from the build context to the image.
Incorrect! Try again.
7What is a Docker image?
Dockerfile and container image creation
Easy
A.A template used to create containers
B.A process that monitors network traffic
C.A log generated by an application
D.A server that schedules virtual machines
Correct Answer: A template used to create containers
Explanation:
A Docker image is a packaged template containing the application, dependencies, and configuration needed to create containers.
Incorrect! Try again.
8What is container orchestration?
Container orchestration
Easy
A.Converting containers into virtual machines
B.Automating the management of containers
C.Writing code inside a container
D.Compressing images into smaller files
Correct Answer: Automating the management of containers
Explanation:
Container orchestration automates container deployment, scaling, networking, and recovery.
Incorrect! Try again.
9Which task is commonly handled by a container orchestration platform?
Container orchestration
Easy
A.Designing user interfaces
B.Editing application source code
C.Scaling container instances
D.Creating database table names
Correct Answer: Scaling container instances
Explanation:
Orchestration platforms can automatically increase or decrease the number of running container instances.
Incorrect! Try again.
10Why is container orchestration useful for microservices?
Container orchestration
Easy
A.It combines all services into one process
B.It removes the need for application testing
C.It manages many distributed containers
D.It converts source code into documentation
Correct Answer: It manages many distributed containers
Explanation:
Microservice systems may contain many containers, so orchestration helps manage them across multiple machines.
Incorrect! Try again.
11What is Kubernetes?
Overview of Kubernetes and its architecture
Easy
A.A programming language compiler
B.A container orchestration platform
C.A source code text editor
D.A relational database system
Correct Answer: A container orchestration platform
Explanation:
Kubernetes is an open-source platform for deploying, scaling, and managing containerized applications.
Incorrect! Try again.
12What is the smallest deployable unit in Kubernetes?
Overview of Kubernetes and its architecture
Easy
A.A cluster
B.A node
C.A pod
D.A namespace
Correct Answer: A pod
Explanation:
A pod is the smallest Kubernetes unit that can be created and deployed.
Incorrect! Try again.
13Which part of Kubernetes manages the overall state of a cluster?
Overview of Kubernetes and its architecture
Easy
A.The service endpoint
B.The container image
C.The application volume
D.The control plane
Correct Answer: The control plane
Explanation:
The control plane makes cluster-wide decisions and manages the desired state of Kubernetes resources.
Incorrect! Try again.
14What is the role of a Kubernetes worker node?
Overview of Kubernetes and its architecture
Easy
A.To build physical network devices
B.To design container image layers
C.To store Git commit history
D.To run application workloads
Correct Answer: To run application workloads
Explanation:
Worker nodes run pods containing the containerized application workloads.
Incorrect! Try again.
15Which Kubernetes component communicates with the control plane and manages pods on a worker node?
Overview of Kubernetes and its architecture
Easy
A.Dockerfile
B.kubelet
C.kubectl
D.etcdctl
Correct Answer: kubelet
Explanation:
The kubelet is an agent on each worker node that ensures the assigned pods are running.
Incorrect! Try again.
16Which Kubernetes resource is commonly used to manage replicated instances of a microservice?
Deploying microservices
Easy
A.Secret
B.Deployment
C.Namespace
D.ConfigMap
Correct Answer: Deployment
Explanation:
A Kubernetes Deployment manages replicated pods and supports updates to an application.
Incorrect! Try again.
17Which Kubernetes resource provides a stable network endpoint for a set of pods?
Deploying microservices
Easy
A.ConfigMap
B.Service
C.Namespace
D.ReplicaSet
Correct Answer: Service
Explanation:
A Kubernetes Service provides stable network access to selected pods even when individual pods change.
Incorrect! Try again.
18What does increasing the replica count of a microservice do?
Deploying microservices
Easy
A.Runs more instances of the service
B.Combines all services into one container
C.Disables communication between the pods
D.Deletes the image from the registry
Correct Answer: Runs more instances of the service
Explanation:
Increasing the replica count creates more running instances, which can improve capacity and availability.
Incorrect! Try again.
19What is Continuous Integration?
Continuous Integration (CI) principles
Easy
A.Replacing source code with container images
B.Deploying code only once each year
C.Running every service on one computer
D.Frequently merging code into a shared repository
Correct Answer: Frequently merging code into a shared repository
Explanation:
Continuous Integration encourages developers to merge small code changes frequently into a shared repository.
Incorrect! Try again.
20What commonly happens after code is committed in a CI process?
Continuous Integration (CI) principles
Easy
A.Automated builds and tests run
B.The production server is removed
C.All project files are deleted
D.Manual testing becomes impossible
Correct Answer: Automated builds and tests run
Explanation:
A CI pipeline commonly builds the application and runs automated tests after code changes are committed.
Incorrect! Try again.
21A microservice writes uploaded files inside its container. The files disappear whenever the container is replaced. Which Docker feature should be used to preserve the files?
Containerization with Docker
Medium
A.A container label
B.A custom bridge network
C.A health check
D.A named volume
Correct Answer: A named volume
Explanation:
A named volume stores data outside the container's writable layer, so the data remains available when the container is replaced.
Incorrect! Try again.
22A web service works inside a Docker container but cannot be reached through its published host port. The service is listening only on 127.0.0.1 inside the container. What is the most appropriate correction?
Containerization with Docker
Medium
A.Run the image in privileged mode
B.Bind the service to 0.0.0.0
C.Create an anonymous volume
D.Change the container hostname
Correct Answer: Bind the service to 0.0.0.0
Explanation:
Binding to 0.0.0.0 makes the service listen on all container interfaces, allowing traffic forwarded through the published port to reach it.
Incorrect! Try again.
23A Dockerfile copies the entire source tree before running npm install. Small source-code changes therefore cause dependencies to be reinstalled. Which change best improves build caching?
Dockerfile and container image creation
Medium
A.Copy dependency files before source files
B.Place EXPOSE before the base image
C.Combine the build with container startup
D.Run npm install after CMD
Correct Answer: Copy dependency files before source files
Explanation:
Copying files such as package.json first allows Docker to reuse the dependency layer until those files actually change.
Incorrect! Try again.
24A compiled microservice image contains compilers, source code, and temporary build files, making it unnecessarily large. Which Dockerfile technique best addresses this issue?
Dockerfile and container image creation
Medium
A.Expose fewer container ports
B.Add more image tags
C.Use a larger base image
D.Use a multi-stage build
Correct Answer: Use a multi-stage build
Explanation:
A multi-stage build compiles the application in one stage and copies only the required runtime artifacts into the final image.
Incorrect! Try again.
25A security review finds that a microservice runs as root inside its container even though it requires no privileged operations. Which Dockerfile instruction should be used to change its runtime identity?
Dockerfile and container image creation
Medium
A.USER appuser
B.LABEL user=appuser
C.ARG appuser
D.WORKDIR /app
Correct Answer: USER appuser
Explanation:
The USER instruction specifies the account used to run subsequent build instructions and the container's default process.
Incorrect! Try again.
26An orchestrator is configured to maintain five instances of a payment service. One host fails and two instances stop. What should the orchestrator do under a desired-state model?
Container orchestration
Medium
A.Route all traffic to the failed host
B.Start two replacement instances
C.Wait for an administrator to restart them
D.Reduce the desired count to three
Correct Answer: Start two replacement instances
Explanation:
An orchestrator continuously reconciles actual state with desired state, so it creates replacements to restore the requested five instances.
Incorrect! Try again.
27During a rolling update, new containers start quickly but need 20 seconds before they can serve requests. Which mechanism should prevent traffic from reaching them too early?
Container orchestration
Medium
A.A build argument
B.A readiness check
C.A storage driver
D.A restart policy
Correct Answer: A readiness check
Explanation:
A readiness check keeps a new instance out of service endpoints until it is prepared to handle traffic.
Incorrect! Try again.
28Several replicas of a microservice are created and removed dynamically. Client services should not track the IP address of each replica. Which orchestration capability solves this problem?
Container orchestration
Medium
A.Volume formatting
B.Image compression
C.Layer caching
D.Service discovery
Correct Answer: Service discovery
Explanation:
Service discovery provides a stable service identity and resolves it to the currently available replicas.
Incorrect! Try again.
29A newly created Pod remains pending because Kubernetes has not yet selected a worker node for it. Which control-plane component is primarily responsible for this selection?
Overview of Kubernetes and its architecture
Medium
A.kube-proxy
B.etcd
C.kube-scheduler
D.kubelet
Correct Answer: kube-scheduler
Explanation:
The kube-scheduler evaluates unscheduled Pods and selects suitable nodes based on resources, constraints, and scheduling policies.
Incorrect! Try again.
30The Kubernetes control plane needs a consistent key-value store for cluster configuration and desired-state data. Which component provides this storage?
Overview of Kubernetes and its architecture
Medium
A.etcd
B.kube-proxy
C.CoreDNS
D.kubelet
Correct Answer: etcd
Explanation:
etcd is the distributed key-value store used by Kubernetes to persist cluster state and configuration.
Incorrect! Try again.
31A container in a Pod terminates unexpectedly. Which node-level Kubernetes component observes the Pod specification and works with the container runtime to restart it?
Overview of Kubernetes and its architecture
Medium
A.cloud-controller-manager
B.kubelet
C.kube-scheduler
D.etcd
Correct Answer: kubelet
Explanation:
The kubelet runs on each worker node and ensures that the containers described by assigned Pod specifications are running.
Incorrect! Try again.
32A team directly creates a single Kubernetes Pod for a microservice. After the Pod is deleted, no replacement appears. Which resource should the team normally create instead?
Overview of Kubernetes and its architecture
Medium
A.A PersistentVolume
B.A Deployment
C.A Namespace
D.A ConfigMap
Correct Answer: A Deployment
Explanation:
A Deployment manages ReplicaSets and recreates Pods to maintain the desired replica count while also supporting controlled updates.
Incorrect! Try again.
33A Kubernetes Deployment runs three replicas whose Pod IP addresses change over time. Which resource should expose them through a stable internal address?
Deploying microservices
Medium
A.A ConfigMap
B.A ReplicaSet
C.A ClusterIP Service
D.A PersistentVolumeClaim
Correct Answer: A ClusterIP Service
Explanation:
A ClusterIP Service provides stable internal networking and routes requests to matching, ready Pods.
Incorrect! Try again.
34A microservice requires database credentials at runtime. The team wants to avoid embedding them in the container image. Which Kubernetes resource is most appropriate?
Deploying microservices
Medium
A.A Deployment
B.A Service
C.A StorageClass
D.A Secret
Correct Answer: A Secret
Explanation:
A Secret separates sensitive runtime values from the image and can be supplied to containers through environment variables or mounted files.
Incorrect! Try again.
35A Kubernetes cluster has sufficient total CPU, but a Pod remains pending because its declared CPU requirement cannot fit on any single node. Which setting is the scheduler primarily evaluating?
Deploying microservices
Medium
A.The container's CPU limit
B.The container's CPU request
C.The image's compressed size
D.The Service's target port
Correct Answer: The container's CPU request
Explanation:
The scheduler uses resource requests when deciding whether a node has enough capacity to place a Pod.
Incorrect! Try again.
36A team wants to release a new microservice version to a small percentage of users before wider deployment. Which deployment strategy best supports this goal?
Deploying microservices
Medium
A.Manual restart
B.Canary deployment
C.Vertical scaling
D.Recreate deployment
Correct Answer: Canary deployment
Explanation:
A canary deployment sends limited traffic to the new version, allowing the team to evaluate it before increasing exposure.
Incorrect! Try again.
37Developers merge code only once every few weeks, producing large and difficult integration conflicts. Which CI practice most directly reduces this problem?
Continuous Integration (CI) principles
Medium
A.Integrate small changes frequently
B.Maintain long-lived feature branches
C.Build only production images
D.Delay testing until release
Correct Answer: Integrate small changes frequently
Explanation:
Frequent integration keeps changes small, exposes conflicts early, and provides faster feedback on compatibility.
Incorrect! Try again.
38A CI pipeline takes 45 minutes, but simple formatting errors are discovered only in its final stage. How should the pipeline be improved to fail faster?
Continuous Integration (CI) principles
Medium
A.Run linting near the beginning
B.Run all tests in one final stage
C.Build the image before checking syntax
D.Deploy before executing validation
Correct Answer: Run linting near the beginning
Explanation:
Fast, inexpensive checks should run early so obvious problems stop the pipeline before costly build and test stages.
Incorrect! Try again.
39The same Git commit sometimes produces different container images because dependency versions are resolved differently on each build. Which action best improves reproducibility?
Continuous Integration (CI) principles
Medium
A.Disable the automated test stage
B.Pin dependency and base-image versions
C.Build on developer machines only
D.Use the latest dependency versions
Correct Answer: Pin dependency and base-image versions
Explanation:
Pinning versions prevents builds from silently selecting different dependencies or base images for the same source revision.
Incorrect! Try again.
40A microservice image passes all CI tests in staging. For production, the team rebuilds the source and produces a slightly different image. Which practice better preserves release consistency?
Continuous Integration (CI) principles
Medium
A.Rebuild the image for each environment
B.Install dependencies after deployment
C.Replace the image tag during startup
D.Promote the tested image unchanged
Correct Answer: Promote the tested image unchanged
Explanation:
Promoting the same immutable artifact ensures that production runs the exact image that passed the CI tests.
Incorrect! Try again.
41A Docker container runs an HTTP server using CMD /app/server. During docker stop, the server often fails to perform its SIGTERM shutdown logic and is eventually killed. Which change most directly addresses the signal-delivery problem?
Containerization with Docker
Hard
A.Run the image with an additional named volume
B.Add EXPOSE 8080 before the existing command
C.Replace the command with CMD ["/app/server"]
D.Move the existing command into a RUN instruction
Correct Answer: Replace the command with CMD ["/app/server"]
Explanation:
The exec form runs the server directly as PID 1, allowing it to receive SIGTERM. The shell form commonly makes /bin/sh -c PID 1, which may not forward signals correctly.
Incorrect! Try again.
42A container writes uploaded files to /data without mounting a volume. After the container is deleted and recreated from the same image, the files disappear. Which explanation is correct?
Containerization with Docker
Hard
A.The files existed only in the deleted container's writable layer
B.Docker discarded the files because /data was not exposed
C.The files were stored in an anonymous volume owned by the image
D.Docker automatically removes image layers modified after startup
Correct Answer: The files existed only in the deleted container's writable layer
Explanation:
Each container receives an ephemeral writable layer above the immutable image layers. Deleting the container removes that layer unless persistent data was placed in a volume or bind mount.
Incorrect! Try again.
43A Node.js Dockerfile copies the entire source tree before running npm ci. Every source-code change therefore causes dependencies to be reinstalled. Which instruction order best improves cache reuse while preserving dependency correctness?
Dockerfile and container image creation
Hard
A.Copy dependency manifests, copy the source, and then run npm ci
B.Copy the source, copy package-lock.json, and then run npm ci
C.Run npm ci, copy package-lock.json, and then copy the source
D.Copy dependency manifests, run npm ci, and then copy the source
Correct Answer: Copy dependency manifests, run npm ci, and then copy the source
Explanation:
Dependency installation is cached until the manifest or lockfile changes. Ordinary source changes then invalidate only the later source-copy and build layers.
Incorrect! Try again.
44A private package registry requires a token during image construction. The final image and its layer history must not contain the token. Which approach is most appropriate?
Dockerfile and container image creation
Hard
A.Copy the token, install packages, and remove it in one RUN
B.Use a BuildKit secret mount only in the installation step
C.Store the token in ENV and unset it before CMD executes
D.Pass the token with ARG and delete it in the next layer
Correct Answer: Use a BuildKit secret mount only in the installation step
Explanation:
BuildKit secret mounts expose credentials temporarily without copying them into an image layer. Deleting a token later does not remove it from an earlier layer or metadata.
Incorrect! Try again.
45A Go service is compiled in one stage and its binary is copied into a scratch final stage. The container starts but fails when making HTTPS requests because certificate authorities are unavailable. What is the smallest targeted correction?
Dockerfile and container image creation
Hard
A.Add the source repository and module cache to the final stage
B.Run the binary through a shell installed in the final stage
C.Copy a CA certificate bundle into the expected runtime path
D.Copy the compiler toolchain from the builder into the final stage
Correct Answer: Copy a CA certificate bundle into the expected runtime path
Explanation:
A scratch image has no operating-system files, including trusted CA certificates. HTTPS verification requires an appropriate CA bundle, but not the compiler or source tree.
Incorrect! Try again.
46A team must publish one image tag that runs natively on both linux/amd64 and linux/arm64 clusters. What should the registry tag reference?
Dockerfile and container image creation
Hard
A.An OCI image index referencing architecture-specific image manifests
B.A single AMD64 image rebuilt by each node at container startup
C.A Docker volume containing binaries for both processor architectures
D.A single ARM64 image containing an AMD64 compatibility shell
Correct Answer: An OCI image index referencing architecture-specific image manifests
Explanation:
A multi-platform tag points to an OCI image index or manifest list. The client selects the image manifest matching the node's operating system and architecture.
Incorrect! Try again.
47A service has six replicas. Replicas must be distributed as evenly as possible across zones, and no two replicas may run on the same node. Which scheduling policy combination best expresses both requirements?
Container orchestration
Hard
A.Preferred node affinity by zone plus a pod disruption budget by hostname
B.Zone topology spread constraints plus required pod anti-affinity by hostname
C.A service selector by zone plus a resource quota for each hostname
D.Required node affinity by hostname plus preferred pod affinity by zone
Correct Answer: Zone topology spread constraints plus required pod anti-affinity by hostname
Explanation:
Topology spread constraints balance replicas across zones, while required pod anti-affinity using the hostname topology key prevents matching replicas from sharing a node.
Incorrect! Try again.
48During rolling updates, some requests fail because terminating instances exit while still receiving in-flight traffic. Which design best supports graceful termination?
Container orchestration
Hard
A.Catch SIGKILL, remove the service endpoint, and checkpoint every open connection
B.Handle SIGTERM, stop accepting work, drain requests, and allow sufficient grace time
C.Ignore SIGTERM, shorten the grace period, and retry every failed request
D.Disable readiness checks, extend the startup delay, and immediately stop the process
Correct Answer: Handle SIGTERM, stop accepting work, drain requests, and allow sufficient grace time
Explanation:
The process should react to SIGTERM, cease taking new work, finish in-flight requests, and exit within the termination grace period. SIGKILL cannot be caught.
Incorrect! Try again.
49Which sequence most accurately describes how a newly submitted Pod normally becomes a running workload in Kubernetes?
Overview of Kubernetes and its architecture
Hard
A.The scheduler writes directly to etcd, and the API server launches the runtime
B.The API server persists intent, the scheduler binds a node, and the kubelet starts containers
C.The controller manager launches containers, and the scheduler records them in etcd
D.The kubelet selects a node, the controller manager binds it, and etcd starts containers
Correct Answer: The API server persists intent, the scheduler binds a node, and the kubelet starts containers
Explanation:
The API server validates and stores the Pod specification. The scheduler selects a node through an API binding, after which that node's kubelet asks the container runtime to create the containers.
Incorrect! Try again.
50In a cluster where all etcd members become unavailable but worker nodes and their networking remain healthy, which immediate behavior is most likely?
Overview of Kubernetes and its architecture
Hard
A.Existing containers stop because kubelets require continuous etcd leases
B.The scheduler reconstructs cluster state from container runtimes automatically
C.Service networking stops because kube-proxy reads etcd for every request
D.Existing workloads may continue, but new control-plane state changes fail
Correct Answer: Existing workloads may continue, but new control-plane state changes fail
Explanation:
etcd stores Kubernetes control-plane state, so API mutations and scheduling are impaired when it is unavailable. Existing containers and programmed data-plane rules can continue operating temporarily.
Incorrect! Try again.
51A Pod is Running, but its readiness probe is failing. Assuming default Service behavior and no special endpoint publication settings, how is the Pod treated?
Overview of Kubernetes and its architecture
Hard
A.It is immediately restarted and permanently removed from its ReplicaSet
B.It remains a normal Service endpoint but receives reduced traffic
C.It is rescheduled to another node while preserving its current IP address
D.It is excluded from ready Service endpoints while its containers keep running
Correct Answer: It is excluded from ready Service endpoints while its containers keep running
Explanation:
Readiness failure does not by itself restart a container. It marks the Pod unready, so it is normally omitted from ready Service endpoints until the probe succeeds.
Incorrect! Try again.
52A Deployment has 10 desired replicas, maxSurge: 25%, and maxUnavailable: 25%. Ignoring terminating Pods and probe delays, which limits apply during a rolling update?
Deploying microservices
Hard
A.At most 12 total Pods and at least 8 available Pods
B.At most 13 total Pods and at least 7 available Pods
C.At most 12 total Pods and at least 7 available Pods
D.At most 13 total Pods and at least 8 available Pods
Correct Answer: At most 13 total Pods and at least 8 available Pods
Explanation:
maxSurge percentages round up, so . maxUnavailable percentages round down, so .
Incorrect! Try again.
53A legacy service legitimately needs four minutes to initialize, but after startup it should be restarted if it deadlocks. Which Kubernetes probe arrangement best prevents premature restarts without hiding later failures?
Deploying microservices
Hard
A.Use a readiness probe that permanently succeeds after its first success
B.Use a startup probe followed by independent liveness and readiness probes
C.Use only a liveness probe with failure detection disabled after startup
D.Use only a readiness probe with a four-minute timeout
Correct Answer: Use a startup probe followed by independent liveness and readiness probes
Explanation:
A startup probe suppresses liveness and readiness processing until initialization succeeds. Liveness can then detect deadlocks, while readiness controls whether the Pod receives traffic.
Incorrect! Try again.
54An HPA targets 50% average CPU utilization. Four ready Pods each have valid CPU requests, and the measured average utilization is 80%. Ignoring stabilization, tolerance, and scaling limits, what replica count does the basic HPA formula select?
Deploying microservices
Hard
A.7 replicas
B.8 replicas
C.5 replicas
D.6 replicas
Correct Answer: 7 replicas
Explanation:
The desired count is . CPU utilization is measured relative to the Pods' CPU requests.
Incorrect! Try again.
55A Deployment consumes application configuration through environment variables sourced from a ConfigMap. The ConfigMap is updated, but existing Pods retain the old values. Which deployment technique reliably applies the change?
Deploying microservices
Hard
A.Increase the Deployment revision history and wait for environment refresh
B.Change the Service selector so it references the ConfigMap resource name
C.Add a ConfigMap checksum annotation to the Pod template and redeploy
D.Recreate the ConfigMap with the same name while leaving the Pod template unchanged
Correct Answer: Add a ConfigMap checksum annotation to the Pod template and redeploy
Explanation:
Environment variables are fixed when a container starts. A checksum annotation changes the Pod template when configuration changes, triggering a rollout with newly initialized environment values.
Incorrect! Try again.
56A team runs stable and canary Deployments simultaneously and wants exactly 5% of requests sent to the canary. Why is adding both versions behind a standard Kubernetes Service insufficient for precise weighting?
Deploying microservices
Hard
A.A Service forwards only to Pods created by the oldest ReplicaSet
B.A Service routes canary traffic only when both images share one digest
C.A Service requires every selected Pod to use a distinct container port
D.A Service balances among endpoints without expressing exact version weights
Correct Answer: A Service balances among endpoints without expressing exact version weights
Explanation:
A standard Service selector creates an endpoint pool but does not provide an exact percentage-based split between versions. Precise weighting generally requires an ingress controller, gateway, or service mesh with traffic-splitting support.
Incorrect! Try again.
57Service A is deployed before Service B, and both versions temporarily coexist during rolling updates. A database column must be renamed without downtime. Which migration strategy is safest?
Deploying microservices
Hard
A.Add the new column, support both forms, migrate data, then remove the old column
B.Delete the old column, restore its data, and then add compatibility code
C.Pause all old Pods, rename the column, and resume them with cached connections
D.Rename the column first and deploy both services after the migration completes
Correct Answer: Add the new column, support both forms, migrate data, then remove the old column
Explanation:
The expand-and-contract pattern maintains compatibility while old and new service versions coexist. Destructive schema changes are delayed until all consumers have migrated.
Incorrect! Try again.
58Two pull requests independently pass CI against the current main branch, but their combination fails after both are merged. Which CI practice most directly prevents this integration race?
Continuous Integration (CI) principles
Hard
A.Allow parallel merges and schedule a complete regression suite each night
B.Use a merge queue that tests the prospective combined main-branch state
C.Require developers to rebuild only the files modified by their own branches
D.Run each pull request only against the commit from which its branch originated
Correct Answer: Use a merge queue that tests the prospective combined main-branch state
Explanation:
A merge queue serializes or batches candidates and tests the exact prospective integration result. Independent branch tests cannot detect every interaction between concurrently approved changes.
Incorrect! Try again.
59A CI pipeline produces different container contents from the same Git commit on different days because base images and packages move. Which policy most improves reproducibility?
Continuous Integration (CI) principles
Hard
A.Pin base images by digest and resolve dependencies from locked, immutable artifacts
B.Use floating base tags and clear every dependency cache before each build
C.Rebuild the image repeatedly and publish whichever build completes first
D.Store build timestamps in every layer and select the newest package versions
Correct Answer: Pin base images by digest and resolve dependencies from locked, immutable artifacts
Explanation:
Digest-pinned bases and locked dependencies make build inputs stable and auditable. Floating tags or mutable package indexes can change outputs even when source code is unchanged.
Incorrect! Try again.
60A provider microservice changes a response field from an integer to a string. The provider's unit tests pass, but several independently deployed consumers depend on the integer type. Which CI technique most directly detects this breaking interaction without running every consumer end-to-end?
Continuous Integration (CI) principles
Hard
A.Consumer-driven contract tests verified in the provider pipeline
B.Load tests that measure provider throughput with synthetic requests
C.Container vulnerability scans executed after publishing the image
D.Provider code-coverage thresholds generated from internal unit tests
Correct Answer: Consumer-driven contract tests verified in the provider pipeline
Explanation:
Consumer-driven contracts encode consumer expectations and verify them against provider changes. They can detect incompatible field types without deploying the complete distributed system.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →