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.Designing relational databases
B.Writing operating system kernels
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 repository
B.A container
C.A volume
D.A cluster
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 stop .
B.docker pull .
C.docker build .
D.docker run .
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.COPY
C.RUN
D.FROM
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.ENTRYPOINT
B.EXPOSE
C.COPY
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 process that monitors network traffic
B.A log generated by an application
C.A template used to create containers
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.Writing code inside a container
B.Compressing images into smaller files
C.Converting containers into virtual machines
D.Automating the management of containers
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.Scaling container instances
C.Editing application source code
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 manages many distributed containers
B.It combines all services into one process
C.It removes the need for application testing
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 node
B.A pod
C.A namespace
D.A cluster
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 control plane
B.The application volume
C.The container image
D.The service endpoint
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.kubectl
B.etcdctl
C.kubelet
D.Dockerfile
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.Deployment
B.ConfigMap
C.Namespace
D.Secret
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.Service
B.ReplicaSet
C.ConfigMap
D.Namespace
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.Deletes the image from the registry
B.Runs more instances of the service
C.Disables communication between the pods
D.Combines all services into one container
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.Frequently merging code into a shared repository
B.Replacing source code with container images
C.Running every service on one computer
D.Deploying code only once each year
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.All project files are deleted
B.Automated builds and tests run
C.Manual testing becomes impossible
D.The production server is removed
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 health check
B.A named volume
C.A custom bridge network
D.A container label
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.Bind the service to 0.0.0.0
B.Change the container hostname
C.Create an anonymous volume
D.Run the image in privileged mode
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.Run npm install after CMD
B.Combine the build with container startup
C.Copy dependency files before source files
D.Place EXPOSE before the base image
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.Use a multi-stage build
B.Add more image tags
C.Expose fewer container ports
D.Use a larger base image
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.ARG appuser
B.WORKDIR /app
C.USER appuser
D.LABEL user=appuser
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 storage driver
B.A build argument
C.A restart policy
D.A readiness check
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.Service discovery
B.Image compression
C.Volume formatting
D.Layer caching
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.etcd
B.kubelet
C.kube-proxy
D.kube-scheduler
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.CoreDNS
B.kube-proxy
C.kubelet
D.etcd
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.kube-scheduler
B.kubelet
C.cloud-controller-manager
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 Deployment
B.A Namespace
C.A ConfigMap
D.A PersistentVolume
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 PersistentVolumeClaim
B.A ClusterIP Service
C.A ConfigMap
D.A ReplicaSet
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 Service
B.A Deployment
C.A Secret
D.A StorageClass
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 request
B.The container's CPU limit
C.The Service's target port
D.The image's compressed size
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.Recreate deployment
C.Canary deployment
D.Vertical scaling
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.Delay testing until release
B.Integrate small changes frequently
C.Maintain long-lived feature branches
D.Build only production images
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.Deploy before executing validation
B.Build the image before checking syntax
C.Run linting near the beginning
D.Run all tests in one final stage
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.Build on developer machines only
C.Pin dependency and base-image versions
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.Replace the image tag during startup
B.Rebuild the image for each environment
C.Promote the tested image unchanged
D.Install dependencies after deployment
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.Add EXPOSE 8080 before the existing command
B.Run the image with an additional named volume
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.Docker discarded the files because /data was not exposed
B.Docker automatically removes image layers modified after startup
C.The files were stored in an anonymous volume owned by the image
D.The files existed only in the deleted container's writable layer
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.Run npm ci, copy package-lock.json, and then copy the source
B.Copy dependency manifests, run npm ci, and then copy the source
C.Copy dependency manifests, copy the source, and then run npm ci
D.Copy the source, copy package-lock.json, and then run npm ci
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.Use a BuildKit secret mount only in the installation step
B.Pass the token with ARG and delete it in the next layer
C.Store the token in ENV and unset it before CMD executes
D.Copy the token, install packages, and remove it in one RUN
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.Copy the compiler toolchain from the builder into 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.Add the source repository and module cache to 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.A Docker volume containing binaries for both processor architectures
B.An OCI image index referencing architecture-specific image manifests
C.A single AMD64 image rebuilt by each node at container startup
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.Zone topology spread constraints plus required pod anti-affinity by hostname
B.Required node affinity by hostname plus preferred pod affinity by zone
C.A service selector by zone plus a resource quota for each hostname
D.Preferred node affinity by zone plus a pod disruption budget by hostname
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.Disable readiness checks, extend the startup delay, and immediately stop the process
B.Catch SIGKILL, remove the service endpoint, and checkpoint every open connection
C.Handle SIGTERM, stop accepting work, drain requests, and allow sufficient grace time
D.Ignore SIGTERM, shorten the grace period, and retry every failed request
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 API server persists intent, the scheduler binds a node, and the kubelet starts containers
B.The controller manager launches containers, and the scheduler records them in etcd
C.The kubelet selects a node, the controller manager binds it, and etcd starts containers
D.The scheduler writes directly to etcd, and the API server launches the runtime
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.The scheduler reconstructs cluster state from container runtimes automatically
B.Existing workloads may continue, but new control-plane state changes fail
C.Existing containers stop because kubelets require continuous etcd leases
D.Service networking stops because kube-proxy reads etcd for every request
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 excluded from ready Service endpoints while its containers keep running
B.It is rescheduled to another node while preserving its current IP address
C.It is immediately restarted and permanently removed from its ReplicaSet
D.It remains a normal Service endpoint but receives reduced traffic
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 13 total Pods and at least 8 available Pods
D.At most 12 total Pods and at least 7 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 startup probe followed by independent liveness and readiness probes
B.Use only a readiness probe with a four-minute timeout
C.Use only a liveness probe with failure detection disabled after startup
D.Use a readiness probe that permanently succeeds after its first success
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.5 replicas
B.8 replicas
C.7 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.Change the Service selector so it references the ConfigMap resource name
B.Increase the Deployment revision history and wait for environment refresh
C.Recreate the ConfigMap with the same name while leaving the Pod template unchanged
D.Add a ConfigMap checksum annotation to the Pod template and redeploy
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 routes canary traffic only when both images share one digest
B.A Service balances among endpoints without expressing exact version weights
C.A Service forwards only to Pods created by the oldest ReplicaSet
D.A Service requires every selected Pod to use a distinct container port
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.Pause all old Pods, rename the column, and resume them with cached connections
B.Add the new column, support both forms, migrate data, then remove the old column
C.Delete the old column, restore its data, and then add compatibility code
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.Require developers to rebuild only the files modified by their own branches
B.Use a merge queue that tests the prospective combined main-branch state
C.Allow parallel merges and schedule a complete regression suite each night
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.Store build timestamps in every layer and select the newest package versions
B.Use floating base tags and clear every dependency cache before each build
C.Pin base images by digest and resolve dependencies from locked, immutable artifacts
D.Rebuild the image repeatedly and publish whichever build completes first
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.Provider code-coverage thresholds generated from internal unit tests
B.Load tests that measure provider throughput with synthetic requests
C.Consumer-driven contract tests verified in the provider pipeline
D.Container vulnerability scans executed after publishing the image
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 →