Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
What is the primary function of Docker in the context of microservices?
Not quite. Try another option.
Answer: To package applications and dependencies into a portable container
Docker allows developers to package an application with all of its dependencies into a standardized unit called a container, ensuring consistency across environments.
Question 2 of 50
Which of the following describes a key difference between Virtual Machines (VMs) and Containers?
Not quite. Try another option.
Answer: Containers share the host OS kernel, while VMs include a full guest OS
Containers are lightweight because they share the machine's OS system kernel and therefore do not require an OS per application, unlike VMs.
Question 3 of 50
What is a Docker Image?
Not quite. Try another option.
Answer: A read-only template used to create containers
A Docker image is an immutable (read-only) file that contains the source code, libraries, dependencies, tools, and other files needed for an application to run.
Question 4 of 50
Which file is used to define the instructions for building a Docker image?
Not quite. Try another option.
Answer: Dockerfile
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
Question 5 of 50
In a Dockerfile, which instruction initializes a new build stage and sets the base image?
Not quite. Try another option.
Answer: FROM
The FROM instruction initializes a new build stage and sets the Base Image for subsequent instructions.
Question 6 of 50
What is the purpose of the 'EXPOSE' instruction in a Dockerfile?
Not quite. Try another option.
Answer: It documents that the container listens on the specified network ports at runtime
EXPOSE functions as a type of documentation between the person who builds the image and the person who runs the container, indicating which ports are intended to be published.
Question 7 of 50
Which Docker command is used to list all currently running containers?
Not quite. Try another option.
Answer: docker ps
The 'docker ps' command lists the containers that are currently running. Adding '-a' would show stopped containers as well.
Question 8 of 50
What is Container Orchestration?
Not quite. Try another option.
Answer: The automated management of the lifecycle of containers
Container orchestration handles the automation of tasks such as scheduling, deploying, scaling, load balancing, and managing the health of containers.
Question 9 of 50
Which of the following is the most popular open-source platform for container orchestration?
Not quite. Try another option.
Answer: Kubernetes
Kubernetes (K8s) is the industry standard open-source platform for automating deployment, scaling, and management of containerized applications.
Question 10 of 50
In Kubernetes architecture, what is a 'Pod'?
Not quite. Try another option.
Answer: The smallest deployable unit used to encapsulate one or more containers
A Pod is the basic execution unit of a Kubernetes application, representing a single instance of a running process in your cluster.
Question 11 of 50
What is the role of the 'Control Plane' (formerly Master Node) in Kubernetes?
Not quite. Try another option.
Answer: To manage the cluster, schedule pods, and maintain the desired state
The Control Plane makes global decisions about the cluster (like scheduling) and detects/responds to cluster events.
Question 12 of 50
Which component of the Kubernetes Control Plane is a key-value store used for all cluster data?
Not quite. Try another option.
Answer: etcd
etcd is a consistent and highly-available key-value store used as Kubernetes' backing store for all cluster data.
Question 13 of 50
What is the function of the 'kube-scheduler'?
Not quite. Try another option.
Answer: It assigns newly created Pods to nodes based on resource availability and constraints
The scheduler watches for newly created Pods with no assigned node and selects a node for them to run on.
Question 14 of 50
Which agent runs on every Kubernetes node and ensures that containers are running in a Pod?
Not quite. Try another option.
Answer: kubelet
The kubelet is the primary 'node agent' that runs on each node and ensures that containers described in PodSpecs are running and healthy.
Question 15 of 50
What is a 'Service' in Kubernetes?
Not quite. Try another option.
Answer: An abstraction that defines a logical set of Pods and a policy to access them
A Kubernetes Service enables network access to a set of Pods, often providing load balancing and a stable IP address.
Question 16 of 50
Which command line tool is used to communicate with the Kubernetes cluster?
Not quite. Try another option.
Answer: kubectl
kubectl is the command-line interface for running commands against Kubernetes clusters.
Question 17 of 50
What is the purpose of 'Continuous Integration' (CI)?
Not quite. Try another option.
Answer: To automate the merging of code changes into a shared repository and running tests
CI is the practice of automating the integration of code changes from multiple contributors into a single software project, usually accompanied by automated builds and tests.
Question 18 of 50
Which of the following is a benefit of Continuous Integration?
Not quite. Try another option.
Answer: It detects integration errors early in the development cycle
By integrating frequently, errors are detected immediately by automated tests, making them easier to fix.
Question 19 of 50
In the context of CI/CD, what is a 'Build Artifact'?
Not quite. Try another option.
Answer: A compiled and packaged file (like a JAR or Docker Image) ready for deployment
An artifact is the byproduct produced during the software build process, such as a binary, library, or container image.
Question 20 of 50
What is the difference between 'ADD' and 'COPY' in a Dockerfile?
Not quite. Try another option.
Answer: ADD allows extracting tar files and downloading URLs, while COPY only copies local files
COPY is preferred for basic file copying. ADD has extra features like remote URL support and auto-extraction of tar archives.
Question 21 of 50
What is a 'Deployment' in Kubernetes?
Not quite. Try another option.
Answer: A resource object that manages ReplicaSets and provides declarative updates to Pods
A Deployment provides declarative updates for Pods and ReplicaSets, allowing you to describe the desired state (e.g., image version, replica count).
Question 22 of 50
Which Kubernetes concept is used to isolate resources within the same cluster?
Not quite. Try another option.
Answer: Namespaces
Namespaces provide a mechanism for isolating groups of resources within a single cluster, often used for multi-tenancy or separating environments (dev/test/prod).
Question 23 of 50
What is 'Rolling Update' in the context of microservices deployment?
Not quite. Try another option.
Answer: Gradually replacing instances of the old version with the new version
Rolling updates allow deployments' updates to take place with zero downtime by incrementally updating Pods instances with new ones.
Question 24 of 50
What is the purpose of a '.dockerignore' file?
Not quite. Try another option.
Answer: To specify files and directories that should be excluded from the build context
The .dockerignore file prevents unnecessary files (like git history or temporary build files) from being sent to the Docker daemon, optimizing build speed and image size.
Question 25 of 50
In Kubernetes, what is a 'ReplicaSet' responsible for?
Not quite. Try another option.
Answer: Ensuring a specified number of pod replicas are running at any given time
A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time to ensure availability.
Question 26 of 50
Which instruction in a Dockerfile defines the command to run when the container starts?
Not quite. Try another option.
Answer: CMD
CMD specifies the instruction that is to be executed when a Docker container starts. There can only be one CMD instruction in a Dockerfile.
Question 27 of 50
What is 'Blue-Green Deployment'?
Not quite. Try another option.
Answer: A technique where two identical environments exist, one running production (Blue) and one with the new version (Green)
Blue-Green deployment reduces downtime and risk by running two identical production environments. Only one serves live traffic at a time.
Question 28 of 50
What is the 'Docker Daemon'?
Not quite. Try another option.
Answer: A background service that manages Docker objects like images, containers, and networks
The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects.
Question 29 of 50
Which Kubernetes component exposes the Kubernetes API?
Not quite. Try another option.
Answer: kube-apiserver
The API server is the front end for the Kubernetes control plane; it validates and configures data for the api objects.
Question 30 of 50
What is the primary purpose of 'Docker Hub'?
Not quite. Try another option.
Answer: A cloud-based registry service for sharing and storing Docker images
Docker Hub is the world's largest library and community for container images, allowing users to pull and push images.
Question 31 of 50
What is a 'Canary Deployment'?
Not quite. Try another option.
Answer: Releasing code to a small percentage of users before a full rollout
Canary deployment is a strategy to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users.
Question 32 of 50
Which Docker command creates an image from a Dockerfile?
Not quite. Try another option.
Answer: docker build
The 'docker build' command builds Docker images from a Dockerfile and a 'context' (a set of files).
Question 33 of 50
What does the 'WORKDIR' instruction do in a Dockerfile?
Not quite. Try another option.
Answer: It sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow
WORKDIR sets the directory inside the container where commands will be executed.
Question 34 of 50
In Kubernetes, what is an 'Ingress'?
Not quite. Try another option.
Answer: An API object that manages external access to the services in a cluster, typically HTTP
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
Question 35 of 50
What is the role of 'kube-proxy'?
Not quite. Try another option.
Answer: To maintain network rules on nodes allowing network communication to your Pods
kube-proxy is a network proxy that runs on each node and maintains network rules to allow communication.
Question 36 of 50
Why is immutability important in container images?
Not quite. Try another option.
Answer: It ensures that the container runs exactly the same way in every environment
Immutability means once an image is created, it doesn't change. This guarantees consistency across development, testing, and production.
Question 37 of 50
Which CI tool is widely used for building and testing software projects continuously?
Not quite. Try another option.
Answer: Jenkins
Jenkins is a popular open-source automation server used to automate parts of software development related to building, testing, and deploying.
Question 38 of 50
What is a Multi-stage build in Docker?
Not quite. Try another option.
Answer: A method to reduce image size by using multiple FROM instructions and copying artifacts between stages
Multi-stage builds allow you to use intermediate images to compile code and then copy only the necessary artifacts to the final image, drastically reducing size.
Question 39 of 50
What is the relationship between a Pod and a Node in Kubernetes?
Not quite. Try another option.
Answer: A Pod runs on a Node
A Node is a worker machine (VM or physical). Pods are scheduled to run on Nodes.
Question 40 of 50
Which Kubernetes object is used to store sensitive information like passwords or keys?
Not quite. Try another option.
Answer: Secret
Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys.
Question 41 of 50
What does the 'ENV' instruction do in a Dockerfile?
Not quite. Try another option.
Answer: Sets an environment variable
The ENV instruction sets the environment variable key to the value, which persists when a container is run from the resulting image.
Question 42 of 50
In the context of Docker, what is a 'Volume'?
Not quite. Try another option.
Answer: A mechanism for persisting data generated by and used by Docker containers
Volumes are the preferred mechanism for persisting data generated by and used by Docker containers, as container storage is ephemeral by default.
Question 43 of 50
What is the 'Self-healing' capability in Kubernetes?
Not quite. Try another option.
Answer: The ability of Kubernetes to restart failed containers, replace them, and kill containers that don't respond to health checks
Kubernetes monitors the state of the pods and nodes and automatically attempts to correct discrepancies between the desired state and the actual state.
Question 44 of 50
Which of the following is a key principle of Continuous Integration?
Not quite. Try another option.
Answer: Committing to the main branch frequently (at least daily)
Frequent commits ensure that the code base remains stable and that integration conflicts are resolved quickly.
Question 45 of 50
What is a 'ConfigMap' in Kubernetes?
Not quite. Try another option.
Answer: An API object used to store non-confidential data in key-value pairs
ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable.
Question 46 of 50
What is the 'Sidecar' pattern in microservices deployment?
Not quite. Try another option.
Answer: Deploying a helper container alongside the main application container in the same Pod
The sidecar pattern involves co-locating another container in the same Pod to enhance or extend the functionality of the main container (e.g., logging agents, proxies).
Question 47 of 50
Which Docker command stops a running container?
Not quite. Try another option.
Answer: docker stop
The 'docker stop' command issues a SIGTERM to the main process inside the container to gracefully shut it down.
Question 48 of 50
What is the difference between RUN and CMD in a Dockerfile?
Not quite. Try another option.
Answer: RUN executes during the build phase; CMD executes when the container starts
RUN commands are executed when building the image (e.g., installing packages). CMD specifies the default command to run when the container is launched.
Question 49 of 50
In Kubernetes, what is a 'StatefulSet'?
Not quite. Try another option.
Answer: A workload API object used to manage stateful applications
StatefulSets manage the deployment and scaling of a set of Pods, providing guarantees about the ordering and uniqueness of these Pods (useful for databases).
Question 50 of 50
What is the main advantage of using a 'Layered Architecture' in Docker images?
Not quite. Try another option.
Answer: It allows caching and reuse of layers, speeding up builds and reducing storage
Docker images are built from layers. If a layer hasn't changed, Docker reuses the cached layer, making builds faster and saving disk space.
That's unit 3
Answer a few questions and your score shows up here.
Nearly through. Did unit 3 of INT363 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 3 of INT363 save you a night before the exam?
Then you can help keep it free for the next batch. 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.