Deploy a Simple Application with Docker and Kubernetes Quiz

Explore foundational concepts around containers, microservices, and Kubernetes objects with this essential DevOps and cloud deployment quiz. Test your understanding of Docker, Kubernetes, Pods, Services, Deployments, and Ingress.

  1. Docker's Functionality

    What is the primary benefit of using Docker to package and distribute applications?

    1. It automatically creates Kubernetes clusters
    2. It replaces the need for application source code
    3. It bundles applications and their dependencies into portable containers
    4. It only supports running applications in virtual machines

    Explanation: Docker enables developers to package applications together with all necessary dependencies in a portable container, ensuring consistency across environments. It does not replace source code, strictly require virtual machines, or automatically set up Kubernetes clusters; instead, it simplifies the deployment process.

  2. Kubernetes Clusters Setup

    Which tool can be used to set up a local Kubernetes cluster for learning or development purposes?

    1. Minikube
    2. Docker Compose
    3. Ansible
    4. Terraform

    Explanation: Minikube is designed explicitly for running a Kubernetes cluster locally for development and testing. Ansible and Terraform are automation tools but do not create clusters directly, while Docker Compose manages multi-container Docker applications, not Kubernetes clusters.

  3. Understanding Kubernetes Pods

    In Kubernetes, what describes a Pod?

    1. The smallest deployable unit that can contain one or more containers
    2. A single script to automate deployments
    3. A load-balancing mechanism for distributing traffic
    4. A replacement for Docker images

    Explanation: A Pod is Kubernetes' smallest deployable object and can have one or more containers sharing storage and network. It is not a load balancer, automation script, or substitute for Docker images.

  4. Role of Kubernetes Services

    How does a Kubernetes Service help expose an application deployed on Pods?

    1. It manages user permissions for cluster access
    2. It automatically deploys new application versions
    3. It directly stores user data within the cluster
    4. It provides a stable network endpoint and load balancing across selected Pods

    Explanation: Kubernetes Services abstract a set of Pods and expose them via a consistent IP and DNS, also balancing network traffic. Services do not handle data storage, user permissions, or deployment automation tasks directly.

  5. Function of Ingress in Kubernetes

    What is the main purpose of an Ingress in a Kubernetes environment?

    1. To build Docker images from source code
    2. To manage external HTTP/S access to services within the cluster
    3. To increase the number of Pod replicas automatically
    4. To schedule containers onto physical nodes

    Explanation: Ingress is used in Kubernetes to route HTTP/S requests from outside the cluster to services inside, enabling external access. It does not build images, manage pod scaling, or schedule containers on nodes—those functions belong to other components.