Cloud-Native and Kubernetes Overview
37 Questions
3 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary purpose of a Service in Kubernetes?

  • To handle the control loop of the Kubernetes cluster
  • To store sensitive data in key-value pairs
  • To manage the scheduling of pods on nodes
  • To provide a static IP address and DNS name for a set of pods (correct)
  • Which component of Kubernetes is responsible for determining where to place pods on nodes?

  • API Server
  • Scheduler (correct)
  • Controller Manager
  • Kubelet
  • What is the role of the Scheduler in the Control Plane Node?

  • To determine where to start a pod on a worker node (correct)
  • To manage storage for Pods
  • To handle communication between nodes
  • To restart crashed Pods
  • What type of data is stored in a Secret in Kubernetes?

    <p>A small amount of sensitive data such as a password or token</p> Signup and view all the answers

    What does a StatefulSet provide guarantees about in Kubernetes?

    <p>The ordering and uniqueness of Pods</p> Signup and view all the answers

    What happens to a Pod when its last remaining container dies?

    <p>The Pod is terminated and removed</p> Signup and view all the answers

    What is the role of the Kube Proxy in a Kubernetes cluster?

    <p>To provide routing and filtering rules for ingress traffic to pods</p> Signup and view all the answers

    Which component is responsible for storing the state of the cluster in Kubernetes?

    <p>etcd</p> Signup and view all the answers

    How do containers within the same Pod communicate with one another?

    <p>Using localhost</p> Signup and view all the answers

    Which of the following describes a Deployment in Kubernetes?

    <p>It is a blueprint for creating and managing pods</p> Signup and view all the answers

    What is a ConfigMap primarily used for in Kubernetes?

    <p>To decouple environment-specific configuration from container images</p> Signup and view all the answers

    What is the primary method of interacting with the Kubernetes API server?

    <p>Using the Kubernetes CLI KubeCTL</p> Signup and view all the answers

    Which of the following file formats can be used for writing Kubernetes manifest files?

    <p>YAML and JSON</p> Signup and view all the answers

    What defines the desired state for ReplicaSets and Pods in Kubernetes?

    <p>Deployment</p> Signup and view all the answers

    Which statement is true regarding IP addresses assigned to Pods?

    <p>Each Pod gets its own private IP address</p> Signup and view all the answers

    What is the purpose of Kube Proxy on a Worker Node?

    <p>To facilitate communication between Pods and external services</p> Signup and view all the answers

    What are the key principles of Cloud-Native architecture?

    <p>Microservices, Containerization, Continuous Delivery, DevOps</p> Signup and view all the answers

    Which of the following best describes a Cloud Service Provider (CSP)?

    <p>A collection of cloud services under a unified API</p> Signup and view all the answers

    What distinguishes Microservices architecture from Monolithic architecture?

    <p>Microservices separates functionality into isolated components, while Monolithic integrates everything into one</p> Signup and view all the answers

    What is a Pod in Kubernetes?

    <p>The smallest unit in Kubernetes, encapsulating one or more containers</p> Signup and view all the answers

    Which statement accurately describes the difference between Worker nodes and Control Plane nodes in Kubernetes?

    <p>Control Plane nodes manage Worker nodes, which run applications and workloads.</p> Signup and view all the answers

    What is an advantage of using Kubernetes over Docker?

    <p>Kubernetes can distribute container apps across multiple virtual machines.</p> Signup and view all the answers

    What is the purpose of a Namespace in Kubernetes?

    <p>To isolate different workloads within a cluster.</p> Signup and view all the answers

    How do Containers improve upon the use of Virtual Machines (VMs)?

    <p>Containers isolate applications more effectively than VMs.</p> Signup and view all the answers

    Which types of objects cannot be shared across different namespaces?

    <p>ConfigMaps and Secrets</p> Signup and view all the answers

    What describes Out-of-Tree components in Kubernetes?

    <p>They must be installed manually and extend default behavior.</p> Signup and view all the answers

    What is a key difference between a Job and a CronJob in Kubernetes?

    <p>A Job is a one-off task, whereas a CronJob executes based on a schedule.</p> Signup and view all the answers

    Which types of selectors are used in Kubernetes for selecting objects?

    <p>Label Selector, Field Selector, Node Selector</p> Signup and view all the answers

    How do endpoints function in relation to a Kubernetes Service?

    <p>Endpoints track the IP addresses of Pods assigned to a Service.</p> Signup and view all the answers

    What is the primary function of a ReplicaSet in Kubernetes?

    <p>To ensure high availability by maintaining the desired number of pod replicas</p> Signup and view all the answers

    Which statement is true regarding StatefulSets in Kubernetes?

    <p>StatefulSet pods can be assigned unique ordinal index numbers.</p> Signup and view all the answers

    What does a Headless Service in Kubernetes accomplish?

    <p>Facilitates the creation of unique DNS entries without a ClusterIP</p> Signup and view all the answers

    Which of the following statements about Kubernetes namespaces is accurate?

    <p>Each resource name must be unique within its namespace but not across namespaces.</p> Signup and view all the answers

    How does traffic to the main pod in a StatefulSet get directed during write operations?

    <p>Via a Headless Service DNS hostname</p> Signup and view all the answers

    Which namespace in Kubernetes is designated for system objects created by the Kubernetes system?

    <p>kube-system</p> Signup and view all the answers

    In Kubernetes, what happens when a pod managed by a StatefulSet is rescheduled?

    <p>The original Persistent Volume will be mounted to ensure data integrity.</p> Signup and view all the answers

    What command is used to view all namespaces in a Kubernetes cluster?

    <p>kubectl get namespace</p> Signup and view all the answers

    Study Notes

    Cloud-Native

    • Cloud-native emphasizes application workloads that are portable, modular, and isolated.
    • Cloud-native is characterized by four key principles:
      • Microservices: Multiple apps responsible for one thing, functionality is isolated and stateless.
      • Containerization: Allows running multiple apps that are virtually isolated from each other.
      • Continuous Delivery: Automated processes for software delivery.
      • DevOps: Collaboration and practices between development and operations.
    • A Cloud Service Provider (CSP) offers a collection of cloud services with application integration, metered billing, and a unified API.
    • Virtual Machines (VMs) are not space-efficient and lack application isolation, leading to configuration conflicts, security issues, and resource hogging.

    Kubernetes

    • Kubernetes is an open-source container orchestration system for automating deployment, scaling, and management of containers.
    • Kubernetes provides the ability to run container applications across multiple VMs.
    • Pods are the smallest unit in Kubernetes, representing a group of one or more containers sharing storage, network resources, and settings.
    • Namespaces allow for grouping different workloads on the same cluster.
    • Nodes are virtual machines or physical servers.
      • Control Plane nodes manage worker nodes.
      • Worker nodes run applications and workloads.
    • A Service provides a stable IP address and DNS name for a set of pods, ensuring persistence even when pods are replaced.
    • Ingress translates HTTP/S rules to services.
    • API Server acts as the communication hub for interacting with Kubernetes components.
    • Kubelet is an agent installed on each node, enabling communication with the API Server and KubeCTL.
    • KubeCTL is a command-line interface for interacting with the cluster and components.
    • Cloud Controller Manager allows linking to cloud service providers like AWS, Azure, and GCP.
    • Controller Manager monitors the cluster state and ensures it aligns with the desired state.
    • Scheduler determines where to place pods on nodes.
    • Kube Proxy handles routing and filtering incoming traffic to pods on worker nodes.
    • Network Policy functions as a virtual firewall at the namespace or pod level.

    Kubernetes Components

    • ConfigMap stores non-confidential data in key-value pairs, decoupling environment-specific configurations from container images.
    • Secret stores small amounts of sensitive data, such as passwords, tokens, or keys.
    • Volumes provide a way to mount storage, including local storage on the node or remote cloud storage.
    • StatefulSet guarantees ordering and uniqueness of pods, ensuring consistent data flow.
    • ReplicaSet maintains a specified number of pods and provides availability guarantees.
    • Deployment serves as a blueprint for pods, allowing declarative updates to ReplicaSets and pods.
    • Manifest Files define the configurations of Kubernetes components.
      • Deployment File
      • PodSpec File
      • Network Policy File
    • Manifest Files can be written in:
      • YAML
      • JSON
    • kubectl apply is used to deploy manifest files.

    Cluster Components

    • Control Plane Node (formerly known as Master Node):
      • API Server: The backbone of communication.
      • Scheduler: Determines where to start pods on worker nodes.
      • Controller Manager: Detects state changes and performs actions like restarting crashed pods.
      • etcd: A Key/Value Store that stores the state of the cluster.
      • Kubelet: Allows interaction with the node via KubeCTL.
    • Worker Node:
      • Kubelet
      • Kube Proxy
      • Container Runtime
      • Pods and Containers

    Pods and Containers

    • Pods provide the smallest unit within Kubernetes.
    • Pods are designed for running one application and can have multiple containers.
    • Each Pod receives a private IP address and allows containers to communicate via localhost.
    • Pods can have shared storage volumes attached, accessible by all containers.
    • Pods are destroyed when the last container dies but the pod's IP address is ephemeral (temporary).

    API Server

    • The API Server exposes an HTTP API for communication between end users, components, and external systems.
    • The Kubernetes API allows querying and manipulating the state of API objects.
    • kube-apiserver is the main implementation of the Kubernetes API Server.
    • kube-apiserver scales horizontally by deploying more instances.
    • You can interact with the API Server through:
      • UI
      • API
      • CLI KubeCTL

    Deployment and Replication

    • Deployment provides declarative updates for Pods and ReplicaSets.
    • A Deployment defines the desired state of ReplicaSets and Pods.
    • The Deployment Controller manages the transition between actual and desired states.
    • ReplicaSets maintain a stable set of pod replicas for availability guarantees.
    • Stateful Sets ensure ordering and uniqueness of pods, with persistent volume attachment.
    • Stateless services do not rely on past data.
    • Stateful services rely on past data, such as databases.
    • Headless Service is a service with ClusterIP set to none, directing writes to the main pod and distributing reads across all pods.

    Namespaces, Persistent Volumes, and Endpoints

    • Namespaces logically isolate resources within a Kubernetes cluster, allowing organization based on projects or departments.
    • Namespaces have four initial namespaces:
      • default: For pods and services unless a namespace is specified.
      • kube-public: For publicly visible resources.
      • kube-system: For objects created by the Kubernetes system.
      • kube-node-lease: For node lease objects.
    • Persistent Volume Claim (PVC) dynamically references a Persistent Volume (PV), providing storage for pods.
    • Endpoints track pod IP addresses assigned to Kubernetes Services.
    • When a pod label matches the Service Selector, the pod IP address is added to the endpoints pool.

    Jobs, CronJobs, and Selectors

    • Background Jobs are one-off tasks executed as part of a job.
    • Job creates pods and retries execution until a specified number of pods successfully terminate.
    • CronJob executes jobs based on a repeating schedule.
    • Selectors are used to select Kubernetes objects based on:
      • Label Selector: Based on applied labels.
      • Field Selector: Based on object data (metadata, status).
      • Node Selector: For selective pod placement on nodes.
    • Label Selectors are defined as key-value pairs in the metadata section of manifest files.
    • kubectl get pods -show-labels is used to view pod labels.

    In-Tree and Out-of-Tree Plugins

    • In-Tree Plugins: Default components and functionality residing in the main repository.
    • Out-of-Tree Plugins: Manually installed components that extend or replace default functionality.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    This quiz covers the principles of cloud-native architecture and introduces Kubernetes as a container orchestration system. Learn about microservices, containerization, continuous delivery, and the role of cloud service providers. Test your understanding of foundational concepts critical for modern software development.

    More Like This

    FortiCNP Cloud-Native Security
    20 questions
    Créer une application cloud native
    15 questions
    Kubernetes and Cloud-Native Applications
    19 questions
    Use Quizgecko on...
    Browser
    Browser