Kubernetes with Docker, a beginners guide Quiz

Explore the essentials of getting started with Kubernetes using Docker, including deploying applications, understanding core components, and creating services. Perfect for those new to container orchestration and modern DevOps practices.

  1. Understanding Kubernetes Components

    Which Kubernetes component is responsible for managing a set of identical pods and handling rollout updates?

    1. ConfigMap
    2. Service
    3. Deployment
    4. Node

    Explanation: A Deployment manages a set of identical pods, ensures the desired number of replicas are running, and facilitates rolling updates. A Node is an individual machine in the cluster, not a controller. A Service provides stable networking to pods. ConfigMap is used for injecting configuration data, not for managing pods.

  2. Kubernetes Pod Basics

    What is the smallest deployable unit in Kubernetes that can contain one or more containers?

    1. Namespace
    2. Service
    3. ReplicaSet
    4. Pod

    Explanation: A Pod is the smallest deployable unit in Kubernetes and can include one or more containers. A Service is an abstraction for network access. Namespace scopes cluster resources. ReplicaSet ensures a specified number of pods but is not itself the smallest unit.

  3. Connecting Applications Using Services

    After deploying an application, which Kubernetes resource allows access to its pods through a stable network endpoint?

    1. ConfigMap
    2. Service
    3. Volume
    4. Secret

    Explanation: A Service provides a stable network endpoint and load-balances traffic to the underlying pods. A Volume stores data for containers. ConfigMap and Secret store configuration and sensitive information, not network access.

  4. Installing Kubernetes Locally

    Which tool is commonly used to run a local Kubernetes cluster on a personal computer for learning or development?

    1. Git
    2. kubectl
    3. Docker Compose
    4. Minikube

    Explanation: Minikube runs a local Kubernetes cluster suitable for learning and testing. kubectl is a command-line tool to interact with Kubernetes. Docker Compose manages multi-container Docker applications but not Kubernetes clusters. Git is a version control system.

  5. Container Images in Kubernetes Deployments

    When creating a Kubernetes Deployment for a Node.js app, where must the Docker image be stored so that Kubernetes can pull it?

    1. Inside a ConfigMap
    2. On a USB flash drive
    3. In a container registry
    4. In a local folder on the admin's computer

    Explanation: Kubernetes pulls container images from a container registry, which is accessible to the cluster nodes. A USB flash drive and a local folder are not accessible to the cluster. A ConfigMap is not designed to store container images.