



























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




























































































Question 1. Which Linux kernel primitive provides isolation of process IDs across containers? A) Cgroups B) PID namespace C) Network namespace D) UTS namespace Answer: B Explanation: The PID namespace creates a separate process ID number space, allowing containers to have their own init process with PID 1, isolated from the host and other containers. Question 2. In the context of virtualization, a Type 1 hypervisor runs directly on: A) The host operating system B) The hardware (bare metal) C) A virtual machine D) A container engine Answer: B Explanation: Type 1 (bareāmetal) hypervisors run directly on the physical hardware, providing higher performance and isolation compared to Type 2 hypervisors that sit on top of an OS. Question 3. Which of the following best describes the āit works on my machineā problem that containers aim to solve? A) Lack of hardware resources B) Inconsistent runtime environments between development and production C) Slow network connectivity D) Insufficient logging capabilities
Answer: B Explanation: Containers package an application with its dependencies, ensuring the same environment across dev, test, and prod, eliminating the classic āit works on my machineā issue. Question 4. Which service model delivers a complete runtime environment for developers, abstracting away the underlying infrastructure? A) CaaS (Containers as a Service) B) PaaS (Platform as a Service) C) IaaS (Infrastructure as a Service) D) FaaS (Function as a Service) Answer: B Explanation: PaaS provides a full platformāincluding runtime, middleware, and development toolsāso developers can focus on code without managing servers or containers directly. Question 5. Which of the following is NOT a characteristic of containers when compared with virtual machines? A) Faster startup time B) Full kernel isolation per instance C) Smaller footprint D) Shared host kernel Answer: B Explanation: Containers share the host kernel; they do not have a full kernel per instance, unlike VMs which each run their own kernel. Question 6. What is the primary purpose of cgroups in Linux containers? A) Provide network isolation
Question 9. Which Dockerfile instruction is evaluated at build time and cannot be accessed from within the running container? A) ENV B) ARG C) LABEL D) VOLUME Answer: B Explanation: ARG defines a buildātime variable; its value is not persisted into the final image, unlike ENV which becomes part of the containerās environment. Question 10. Multiāstage builds primarily help to: A) Run multiple containers simultaneously B) Reduce final image size by discarding intermediate layers C) Enable parallel builds on different hosts D) Provide builtāin load balancing Answer: B Explanation: Multiāstage Dockerfiles allow you to copy only the artifacts needed for runtime from earlier stages, discarding build tools and reducing the final image footprint. Question 11. Which OCI component defines the runtime specification for containers? A) runc B) containerd C) CRI-O D) OCI Image Format Answer: A
Explanation: runc implements the OCI Runtime Specification, translating the image configuration into a running container instance. Question 12. When pushing an image to a private registry, which feature ensures the image has not been tampered with? A) Content Trust (Docker Notary) B) Layer caching C) Multiāarch manifest D) BuildKit Answer: A Explanation: Docker Content Trust uses Notary to sign images, enabling verification of integrity and authenticity when pulling from a registry. Question 13. Which of the following base images is most commonly used to minimize attack surface? A) Ubuntu B) Alpine C) CentOS D) Debian Answer: B Explanation: Alpine Linux is a minimal distribution (ā5 MB) that reduces the number of packages and thus the potential vulnerability surface. Question 14. In the Container Network Model (CNM), which component is responsible for assigning IP addresses to containers? A) CNI plugin B) Docker daemon
Question 17. Which Kubernetes component provides internal DNS resolution for services and pods? A) kube-apiserver B) CoreDNS C) kube-proxy D) etcd Answer: B Explanation: CoreDNS runs as a cluster addāon and supplies DNS entries for services and pods, enabling nameābased service discovery within the cluster. Question 18. NetworkPolicy objects in Kubernetes are used to: A) Define loadābalancing algorithms B) Restrict podātoāpod traffic based on L3/L4 rules C) Allocate static IP addresses D) Create overlay networks Answer: B Explanation: NetworkPolicy resources allow administrators to whitelist or blacklist traffic to/from pods, providing microāsegmentation at the IP/port level. Question 19. Which storage driver in Docker is recommended for production on modern Linux kernels due to its performance and stability? A) aufs B) devicemapper C) overlay D) btrfs Answer: C
Explanation: overlay2 leverages the kernelās OverlayFS, offering superior speed, lower overhead, and broad compatibility with recent kernel versions. Question 20. A bind mount is best described as: A) A Dockerāmanaged volume stored in /var/lib/docker/volumes B) A host directory mounted into a container at a specific path C) An ināmemory temporary filesystem D) A readāonly snapshot of an image layer Answer: B Explanation: Bind mounts map a directory or file from the host filesystem directly into the container, allowing containers to read/write host data. Question 21. In Kubernetes, which object abstracts the physical storage provisioned by an administrator? A) ConfigMap B) PersistentVolume (PV) C) Service D) ReplicaSet Answer: B Explanation: A PersistentVolume represents a piece of storage in the cluster that has been provisioned by an admin or dynamically by a storage class. Question 22. Which CSI (Container Storage Interface) feature enables dynamic provisioning of storage without preācreating PV objects? A) VolumeSnapshot B) StorageClass
Question 25. Which deployment strategy allows a new version of an application to receive a small fraction of traffic while the majority continues to use the stable version? A) Rolling update B) Blue/Green C) Canary release D) Recreate Answer: C Explanation: Canary releases gradually shift a subset of traffic to the new version, enabling testing in production before a full rollout. Question 26. Node affinity in Kubernetes is used to: A) Limit the number of pods per node B) Schedule pods onto nodes that match specified label criteria C) Evict pods based on memory pressure D) Provide network isolation between nodes Answer: B Explanation: Node affinity expresses preferences or hard requirements for pod placement based on node labels, influencing the schedulerās decisions. Question 27. Which Kubernetes feature allows a pod to tolerate a nodeās taint, preventing eviction? A) NodeSelector B) Tolerations C) PodDisruptionBudget D) PriorityClass Answer: B
Explanation: Tolerations enable pods to be scheduled onto nodes that have matching taints, allowing administrators to reserve nodes for special workloads. Question 28. The sidecar pattern is commonly used to: A) Replace the main application binary with a proxy B) Run an auxiliary container that adds functionality such as logging or monitoring C) Scale the primary container horizontally D) Provide a backup replica of the pod Answer: B Explanation: A sidecar container lives in the same pod as the main app, extending its capabilities (e.g., log collection) without modifying the primary containerās code. Question 29. In the ambassador pattern, the auxiliary container typically runs as a: A) Init container that performs preāflight checks B) Proxy that handles inbound/outbound traffic for the main app C) Scheduler that decides pod placement D) Storage driver for persistent volumes Answer: B Explanation: The ambassador pattern deploys a proxy (often Envoy or HAProxy) as a separate container to manage external communication, implement circuit breaking, or provide protocol translation. Question 30. Which design pattern is most appropriate for ensuring that only one instance of a service performs a specific task in a distributed system? A) Adapter B) Leader election
B) HTTP over port 9090 C) gRPC D) UDP Answer: B Explanation: Prometheus pulls metrics via HTTP GET requests (default port 9090) from endpoints exposing data in the Prometheus exposition format. Question 34. Which Kubernetes probe is used to determine whether a pod is ready to receive traffic? A) Liveness probe B) Startup probe C) Readiness probe D) Health probe Answer: C Explanation: The readinessProbe signals to the kubeāproxy and service load balancer that a pod is prepared to accept requests; failing it removes the pod from service endpoints. Question 35. A āCrashLoopBackOffā pod status most often indicates: A) Insufficient CPU limits B) The container repeatedly exits with a nonāzero status C) Network policy blocking traffic D) Persistent volume claim error Answer: B Explanation: CrashLoopBackOff occurs when a container starts, crashes, and the kubelet attempts to restart it repeatedly, backing off after each failure.
Question 36. Which tool is commonly used to perform distributed tracing across microservices in a Kubernetes environment? A) Fluentd B) Jaeger C) Prometheus D) Grafana Answer: B Explanation: Jaeger implements the OpenTracing standard and collects trace spans from services, enabling endātoāend request flow visualization. Question 37. Seccomp profiles in container runtimes are primarily used to: A) Encrypt container images B) Restrict system calls a container can make C) Provide roleābased access control for APIs D) Manage storage class parameters Answer: B Explanation: Seccomp (Secure Computing Mode) filters system calls, reducing the attack surface by allowing only a whitelist of needed calls for a container. Question 38. In Kubernetes RBAC, which resource defines a set of permissions that can be granted to users or service accounts? A) RoleBinding B) ClusterRole C) ServiceAccount D) ConfigMap
B) Restrict /var/run/docker.sock to the docker group C) Disable the daemonās logging driver D) Enable experimental features Answer: B Explanation: The CIS Docker Benchmark advises limiting access to the Docker socket (/var/run/docker.sock) to a dedicated group, preventing unauthorized users from controlling the daemon. Question 42. Which of the following is a primary advantage of using a distroless base image? A) Includes a package manager for easy updates B] Provides a full shell environment for debugging C) Removes unnecessary OS components, reducing attack surface D) Guarantees compatibility with all Linux kernels Answer: C Explanation: Distroless images contain only the application and its runtime dependencies, omitting shells, package managers, and other utilities, thereby shrinking the attack surface. Question 43. In Docker, what does the --squash flag do during image build? A) Compresses the final image file on disk B) Merges all intermediate layers into a single layer C) Removes all unused images from the host D) Enables image signing with Notary Answer: B Explanation: --squash consolidates all layers created during the Dockerfile build into one final layer, producing a smaller, less inspectable image.
Question 44. Which CNI plugin is known for providing highāperformance networking using the Linux kernelās veth and iptables mechanisms? A) Flannel B) Calico C) Weave Net D) Cilium Answer: B Explanation: Calico implements L3 routing with iptables (or eBPF in newer versions) and uses veth pairs, delivering highāperformance, policyādriven networking. Question 45. A Kubernetes Service of type LoadBalancer typically interacts with which external component in cloud environments? A) kubeāproxy B) Ingress controller C) Cloud providerās load balancer (e.g., ELB, ALB) D) DNS server Answer: C Explanation: In managed clouds, a LoadBalancer Service provisions a cloudānative external load balancer (AWS ELB, GCP LB, Azure LB) that forwards traffic to the serviceās pods. Question 46. Which of the following best describes a āblue/greenā deployment? A) Deploying two versions simultaneously and routing a percentage of traffic to each B) Deploying a new version to a separate environment, then switching traffic after verification C) Rolling out updates podābyāpod without downtime D) Using canary pods to test new features
A) PodAffinity B) Taint C) DaemonSet D) ConfigMap Answer: A Explanation: podAffinity (or requiredDuringSchedulingIgnoredDuringExecution) expresses a hard rule that a pod must be coālocated with pods matching certain labels on the same node. Question 50. The kubeāproxy component in Kubernetes primarily operates in which mode to implement Service networking? A) IPVS mode B) CNI mode C) CSI mode D) ETCD mode Answer: A Explanation: kube-proxy can run in iptables or IPVS mode; IPVS provides higher performance load balancing by using Linux Virtual Server, which is the default in many modern clusters. Question 51. Which of the following is a key benefit of using a āstoreāandāforwardā logging architecture such as the ELK stack? A) Logs are stored directly on the containerās root filesystem B) Log data can be indexed, searched, and visualized centrally C) Each container writes logs to a separate Elasticsearch node D) Logging is performed without any network traffic Answer: B
Explanation: The ELK (ElasticsearchāLogstashāKibana) stack collects logs from many sources, indexes them, and provides powerful search and visualization capabilities. Question 52. In a Kubernetes cluster, which component validates API requests before they are persisted in etcd? A) kubeāscheduler B) kubeācontrollerāmanager C) kubeāapiserver D) kubeāproxy Answer: C Explanation: The kube-apiserver acts as the frontāend, authenticating, authorizing, and validating all incoming API calls before committing changes to etcd. Question 53. Which of the following best describes a ācontainer escapeā attack? A) Hijacking a containerās network traffic B) Exploiting a vulnerability to gain access to the host kernel from inside a container C) Overloading a container with CPU requests D) Deleting a container image from a registry Answer: B Explanation: A container escape occurs when an attacker breaks out of the container isolation mechanisms (namespaces, cgroups) to execute code on the host system. Question 54. What is the primary purpose of the kubeāadm tool? A) Deploy a fully managed cloud Kubernetes service B) Provide a simple way to bootstrap a conformant Kubernetes control plane C) Manage container image builds