Containerization with Docker MCQs

  1. Which of the following best describes containerization?
    a) Packaging applications with dependencies into isolated units
    b) Running applications directly on hardware
    c) Deploying applications manually
    d) Monitoring production logs
    View Answer

    Correct answer: A — Packaging applications with dependencies into isolated units

  2. Docker is primarily used for:
    a) Creating and managing containers
    b) Running CI/CD pipelines
    c) Performing unit testing
    d) Monitoring logs
    View Answer

    Correct answer: A — Creating and managing containers

  3. Kubernetes is used for:
    a) Orchestrating containerized applications
    b) Running unit tests
    c) Performing performance testing
    d) Monitoring usability
    View Answer

    Correct answer: A — Orchestrating containerized applications

  4. Which of the following is NOT a containerization tool?
    a) Docker
    b) Podman
    c) Vagrant
    d) LXC
    View Answer

    Correct answer: C — Vagrant

  5. Docker images are built using:
    a) Dockerfile
    b) JSON file
    c) XML file
    d) TXT file
    View Answer

    Correct answer: A — Dockerfile

  6. Which of the following is true about Kubernetes pods?
    a) They are the smallest deployable units in Kubernetes
    b) They are only used for monitoring
    c) They are only used for testing
    d) They are only used for CI/CD
    View Answer

    Correct answer: A — They are the smallest deployable units in Kubernetes

  7. Docker Compose is used to:
    a) Define and run multi-container applications
    b) Run single container only
    c) Run CI/CD pipelines
    d) Run performance tests
    View Answer

    Correct answer: A — Define and run multi-container applications

  8. Which of the following is true about Kubernetes services?
    a) They expose pods to network traffic
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They expose pods to network traffic

  9. Which of the following is a Kubernetes deployment strategy?
    a) Rolling updates
    b) Manual updates only
    c) Usability updates only
    d) Integration updates only
    View Answer

    Correct answer: A — Rolling updates

  10. Helm is used for:
    a) Managing Kubernetes applications with charts
    b) Running unit tests
    c) Performing performance testing
    d) Monitoring logs
    View Answer

    Correct answer: A — Managing Kubernetes applications with charts

  11. What will be printed?
    1 echo "Eduinq Container Test"
    a) Eduinq Container Test
    b) Container Test
    c) No output
    d) Error
    View Answer

    Correct answer: A — Eduinq Container Test

  12. Which of the following is true about Docker volumes?
    a) They persist data outside containers
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They persist data outside containers

  13. Kubernetes ConfigMaps are used to:
    a) Store configuration data
    b) Store performance metrics
    c) Store usability data
    d) Store integration data
    View Answer

    Correct answer: A — Store configuration data

  14. Which of the following is true about Kubernetes namespaces?
    a) They logically isolate resources within a cluster
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They logically isolate resources within a cluster

  15. Docker Hub is:
    a) A public registry for Docker images
    b) A CI/CD tool
    c) A performance testing tool
    d) A monitoring tool
    View Answer

    Correct answer: A — A public registry for Docker images

  16. Which of the following is true about Kubernetes deployments?
    a) They manage desired state of pods
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They manage desired state of pods

  17. Kubernetes StatefulSets are used for:
    a) Managing stateful applications
    b) Managing stateless applications only
    c) Managing usability tests
    d) Managing integration tests
    View Answer

    Correct answer: A — Managing stateful applications

  18. Which of the following is true about Docker networking?
    a) It allows containers to communicate with each other
    b) It validates performance only
    c) It validates usability only
    d) It validates integration only
    View Answer

    Correct answer: A — It allows containers to communicate with each other

  19. Kubernetes Ingress is used to:
    a) Manage external access to services
    b) Manage performance only
    c) Manage usability only
    d) Manage integration only
    View Answer

    Correct answer: A — Manage external access to services

  20. Which of the following is true about container orchestration?
    a) It automates deployment, scaling, and management of containers
    b) It validates performance only
    c) It validates usability only
    d) It validates integration only
    View Answer

    Correct answer: A — It automates deployment, scaling, and management of containers

  21. Which of the following is true about Docker containers?
    a) They are lightweight and portable
    b) They require full virtual machines
    c) They run only on Windows
    d) They run only on Linux
    View Answer

    Correct answer: A — They are lightweight and portable

  22. Kubernetes nodes are:
    a) Worker machines in a cluster
    b) Only monitoring servers
    c) Only testing servers
    d) Only CI/CD servers
    View Answer

    Correct answer: A — Worker machines in a cluster

  23. Which of the following is true about Docker layers?
    a) They allow efficient image storage and reuse
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They allow efficient image storage and reuse

  24. Kubernetes ReplicaSets are used to:
    a) Ensure a specified number of pod replicas are running
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Ensure a specified number of pod replicas are running

  25. Which of the following is true about Docker registries?
    a) They store and distribute container images
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They store and distribute container images

  26. Kubernetes DaemonSets are used to:
    a) Run a copy of a pod on all nodes
    b) Run pods only on master nodes
    c) Run pods only on worker nodes
    d) Run pods only manually
    View Answer

    Correct answer: A — Run a copy of a pod on all nodes

  27. Which of the following is true about Docker Swarm?
    a) It provides native container orchestration for Docker
    b) It validates performance only
    c) It validates usability only
    d) It validates integration only
    View Answer

    Correct answer: A — It provides native container orchestration for Docker

  28. Kubernetes Secrets are used to:
    a) Store sensitive information securely
    b) Store performance metrics
    c) Store usability data
    d) Store integration data
    View Answer

    Correct answer: A — Store sensitive information securely

  29. Which of the following is true about container orchestration tools?
    a) They automate deployment, scaling, and management of containers
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They automate deployment, scaling, and management of containers

  30. Kubernetes kubelet is:
    a) An agent that runs on each node
    b) A monitoring tool
    c) A CI/CD tool
    d) A performance testing tool
    View Answer

    Correct answer: A — An agent that runs on each node

  31. What will be printed?
    1 echo "Eduinq Kubernetes Deployment"
    a) Eduinq Kubernetes Deployment
    b) Kubernetes Deployment
    c) No output
    d) Error
    View Answer

    Correct answer: A — Eduinq Kubernetes Deployment

  32. Which of the following is true about Docker networking modes?
    a) Bridge, Host, Overlay
    b) Only Bridge
    c) Only Host
    d) Only Overlay
    View Answer

    Correct answer: A — Bridge, Host, Overlay

  33. Kubernetes kube-proxy is responsible for:
    a) Managing network rules for pods
    b) Managing performance only
    c) Managing usability only
    d) Managing integration only
    View Answer

    Correct answer: A — Managing network rules for pods

  34. Which of the following is true about Dockerfile instructions?
    a) FROM, RUN, CMD, COPY
    b) Only FROM
    c) Only RUN
    d) Only CMD
    View Answer

    Correct answer: A — FROM, RUN, CMD, COPY

  35. Kubernetes etcd is used to:
    a) Store cluster configuration data
    b) Store performance metrics
    c) Store usability data
    d) Store integration data
    View Answer

    Correct answer: A — Store cluster configuration data

  36. Which of the following is true about Docker Compose files?
    a) They are written in YAML
    b) They are written in JSON
    c) They are written in XML
    d) They are written in TXT
    View Answer

    Correct answer: A — They are written in YAML

  37. Kubernetes labels are used to:
    a) Organize and select resources
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Organize and select resources

  38. Which of the following is true about Docker container lifecycle?
    a) Create, Start, Stop, Remove
    b) Only Create
    c) Only Start
    d) Only Stop
    View Answer

    Correct answer: A — Create, Start, Stop, Remove

  39. Kubernetes Helm charts are:
    a) Packages of pre-configured Kubernetes resources
    b) Packages of performance metrics
    c) Packages of usability data
    d) Packages of integration data
    View Answer

    Correct answer: A — Packages of pre-configured Kubernetes resources

  40. Which of the following is true about container orchestration benefits?
    a) Automated scaling, self-healing, efficient resource use
    b) Only performance validation
    c) Only usability validation
    d) Only integration validation
    View Answer

    Correct answer: A — Automated scaling, self-healing, efficient resource use

  41. Which of the following is true about Docker image tags?
    a) They identify versions of images
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They identify versions of images

  42. Kubernetes deployments support:
    a) Rolling updates and rollbacks
    b) Only rolling updates
    c) Only rollbacks
    d) Only manual updates
    View Answer

    Correct answer: A — Rolling updates and rollbacks

  43. Which of the following is true about Docker container isolation?
    a) It uses namespaces and cgroups
    b) It uses only namespaces
    c) It uses only cgroups
    d) It uses only virtual machines
    View Answer

    Correct answer: A — It uses namespaces and cgroups

  44. Kubernetes cluster autoscaler is used to:
    a) Adjust the number of nodes based on demand
    b) Adjust performance metrics only
    c) Adjust usability only
    d) Adjust integration only
    View Answer

    Correct answer: A — Adjust the number of nodes based on demand

  45. Which of the following is true about Docker multi-stage builds?
    a) They optimize image size by separating build and runtime stages
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They optimize image size by separating build and runtime stages

  46. Kubernetes taints and tolerations are used to:
    a) Control pod placement on nodes
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Control pod placement on nodes

  47. Which of the following is true about Docker overlay networks?
    a) They enable multi-host communication for containers
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They enable multi-host communication for containers

  48. Kubernetes Horizontal Pod Autoscaler adjusts:
    a) Number of pods based on CPU/memory usage
    b) Number of pods based on usability
    c) Number of pods based on integration
    d) Number of pods based on manual triggers
    View Answer

    Correct answer: A — Number of pods based on CPU/memory usage

  49. Which of the following is true about Docker container resource limits?
    a) They restrict CPU and memory usage
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They restrict CPU and memory usage

  50. Which of the following best describes containerization and orchestration overall?
    a) Packaging applications into containers and managing them with orchestration tools
    b) Ensuring only performance correctness
    c) Ensuring only usability correctness
    d) Ensuring only integration correctness
    View Answer

    Correct answer: A — Packaging applications into containers and managing them with orchestration tools

Quick Links to Explore