Kubernetes Concepts

Description

Mid map about Kubernetes Cluster technology concepts.
Bruno Silva
Mind Map by Bruno Silva, updated more than 1 year ago
Bruno Silva
Created by Bruno Silva almost 4 years ago
67
0

Resource summary

Kubernetes Concepts

Annotations:

  • https://kubernetes.io/docs/concepts/ Mind map by Bruno Silva brunojose1977@yahoo.com.br
  1. nodes
    1. Kubernete Master Node

      Annotations:

      • The Kubernetes Master is a collection of three processes that run on a single node in your cluster, which is designated as the master node. Those processes are: kube-apiserver, kube-controller-manager and kube-scheduler.
      1. Processes
        1. kube-apiserver

          Annotations:

          • The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster’s shared state through which all other components interact.                    
          1. kube-controller-manager

            Annotations:

            • The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes. In applications of robotics and automation, a control loop is a non-terminating loop that regulates the state of the system. In Kubernetes, a controller is a control loop that watches the shared state of the cluster through the apiserver and makes changes attempting to move the current state towards the desired state. Examples of controllers that ship with Kubernetes today are the replication controller, endpoints controller, namespace controller, and serviceaccounts controller.
            1. kube-scheduler

              Annotations:

              • The Kubernetes scheduler is a policy-rich, topology-aware, workload-specific function that significantly impacts availability, performance, and capacity. The scheduler needs to take into account individual and collective resource requirements, quality of service requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, deadlines, and so on. Workload-specific requirements will be exposed through the API as necessary. See scheduling for more information about scheduling and the kube-scheduler component.
          2. Kubernete Worker Node
            1. Processes
              1. kubelet

                Annotations:

                • which communicates with the Kubernetes Master.   The kubelet is the primary “node agent” that runs on each node. It can register the node with the apiserver using one of: the hostname; a flag to override the hostname; or specific logic for a cloud provider.
                1. kube-proxy

                  Annotations:

                  • A network proxy which reflects Kubernetes networking services n each node. The Kubernetes network proxy runs on each node. This reflects services as defined in the Kubernetes API on each node and can do simple TCP, UDP, and SCTP stream forwarding or round robin TCP, UDP, and SCTP forwarding across a set of backends. Service cluster IPs and ports are currently found through Docker-links-compatible environment variables specifying ports opened by the service proxy. There is an optional addon that provides cluster DNS for these cluster IPs. The user must create a service with the apiserver API to configure the proxy.
            2. API
              1. kubectl

                Annotations:

                • kubectl. You can also use the Kubernetes API directly to interact with the cluster and set or modify your desired state.
              2. objects
                1. Pod

                  Annotations:

                  • A Pod is the basic execution unit of a Kubernetes application–the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents processes running on your cluster. A Pod encapsulates an application’s container (or, in some cases, multiple containers), storage resources, a unique network identity (IP address), as well as options that govern how the container(s) should run. A Pod represents a unit of deployment: a single instance of an application in Kubernetes, which might consist of either a single container or a small number of containers that are tightly coupled and that share resources.
                  • How Pods manage multiple containers Pods are designed to support multiple cooperating processes (as containers) that form a cohesive unit of service. The containers in a Pod are automatically co-located and co-scheduled on the same physical or virtual machine in the cluster. The containers can share resources and dependencies, communicate with one another, and coordinate when and how they are terminated. Note that grouping multiple co-located and co-managed containers in a single Pod is a relatively advanced use case. You should use this pattern only in specific instances in which your containers are tightly coupled.
                  1. Container Runtime

                    Annotations:

                    • To run containers in Pods, Kubernetes uses a container runtime.  https://kubernetes.io/docs/setup/production-environment/container-runtimes/
                    1. Docker

                      Annotations:

                      • Docker is the most common container runtime used in a Kubernetes Pod. On each of your machines, install Docker. Version 19.03.8 is recommended, but 1.13.1, 17.03, 17.06, 17.09, 18.06 and 18.09 are known to work as well. Keep track of the latest verified Docker version in the Kubernetes release notes.
                      1. cri-0

                        Annotations:

                        • Lightweight Container Runtime for Kubernetes. CRI-O is an implementation of the Kubernetes CRI (Container Runtime Interface) to enable using OCI (Open Container Initiative) compatible runtimes. It is a lightweight alternative to using Docker as the runtime for kubernetes. It allows Kubernetes to use any OCI-compliant runtime as the container runtime for running pods. Today it supports runc and Kata Containers as the container runtimes but any OCI-conformant runtime can be plugged in principle.CRI-O supports OCI container images and can pull from any container registry. It is a lightweight alternative to using Docker, Moby or rkt as the runtime for Kubernetes. https://cri-o.io/
                        1. Containerd

                          Annotations:

                          • As of February 28, 2019, containerd is officially a graduated project within the Cloud Native Computing Foundation, following Kubernetes, https://containerd.io/
                          1. Frakti

                            Annotations:

                            • https://kubernetes.github.io/frakti/deploy.html
                          2. Networking

                            Annotations:

                            • Each Pod is assigned a unique IP address for each address family. Every container in a Pod shares the network namespace, including the IP address and network ports. Containers inside a Pod can communicate with one another using localhost. When containers in a Pod communicate with entities outside the Pod, they must coordinate how they use the shared network resources (such as ports).
                            1. Storage

                              Annotations:

                              • A Pod can specify a set of shared storage volumes. All containers in the Pod can access the shared volumes, allowing those containers to share data. Volumes also allow persistent data in a Pod to survive in case one of the containers within needs to be restarted. See Volumes for more information on how Kubernetes implements shared storage in a Pod.
                              1. Volume
                              2. Workload Resources / Controllers
                                1. Deployments

                                  Annotations:

                                  • A Deployment provides declarative updates for Pods and ReplicaSets. You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
                                  1. StatefulSet

                                    Annotations:

                                    • StatefulSet is the workload API object used to manage stateful applications. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling. If you want to use storage volumes to provide persistence for your workload, you can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet are susceptible to failure, the persistent Pod identifiers make it easier to match existing volumes to the new Pods that replace any that have failed. StatefulSets are valuable for applications that require one or more of the following.Stable, unique network identifiers.Stable, persistent storage.Ordered, graceful deployment and scaling.Ordered, automated rolling updates.
                                    1. DaemonSet

                                      Annotations:

                                      • A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. Some typical uses of a DaemonSet are: running a cluster storage daemon, such as glusterd, ceph, on each node.running a logs collection daemon on every node, such as fluentd or filebeat.running a node monitoring daemon on every node, such as Prometheus Node Exporter, Flowmill, Sysdig Agent, collectd, Dynatrace OneAgent, AppDynamics Agent, Datadog agent, New Relic agent, Ganglia gmond, Instana Agent or Elastic Metricbeat. In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. A more complex setup might use multiple DaemonSets for a single type of daemon, but with different flags and/or different memory and cpu requests for different hardware types.
                                      1. Pod Templates

                                        Annotations:

                                        • Controllers for workload resources create Pods from a pod template and manage those Pods on your behalf. PodTemplates are specifications for creating Pods, and are included in workload resources such as Deployments, Jobs, and DaemonSets. Each controller for a workload resource uses the PodTemplate inside the workload object to make actual Pods. The PodTemplate is part of the desired state of whatever workload resource you used to run your app.
                                        1. ReplicaSet

                                          Annotations:

                                          • A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.
                                          • A ReplicaSet is defined with fields, including a selector that specifies how to identify Pods it can acquire, a number of replicas indicating how many Pods it should be maintaining, and a pod template specifying the data of new Pods it should create to meet the number of replicas criteria. A ReplicaSet then fulfills its purpose by creating and deleting Pods as needed to reach the desired number. When a ReplicaSet needs to create new Pods, it uses its Pod template. A ReplicaSet is linked to its Pods via the Pods’ metadata.ownerReferences field, which specifies what resource the current object is owned by. All Pods acquired by a ReplicaSet have their owning ReplicaSet’s identifying information within their ownerReferences field. It’s through this link that the ReplicaSet knows of the state of the Pods it is maintaining and plans accordingly. A ReplicaSet identifies new Pods to acquire by using its selector. If there is a Pod that has no OwnerReference or the OwnerReference is not a Controller and it matches a ReplicaSet’s selector, it will be immediately acquired by said ReplicaSet.
                                          • A ReplicaSet ensures that a specified number of pod replicas are running at any given time. However, a Deployment is a higher-level concept that manages ReplicaSets and provides declarative updates to Pods along with a lot of other useful features. Therefore, we recommend using Deployments instead of directly using ReplicaSets, unless you require custom update orchestration or don’t require updates at all. This actually means that you may never need to manipulate ReplicaSet objects: use a Deployment instead, and define your application in the spec section.
                                          1. JOBS

                                            Annotations:

                                            • A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). You can also use a Job to run multiple Pods in parallel.
                                        2. Service

                                          Annotations:

                                          • An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes you don’t need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
                                          • Kubernetes Pods are mortal. They are born and when they die, they are not resurrected. If you use a Deployment to run your app, it can create and destroy Pods dynamically. Each Pod gets its own IP address, however in a Deployment, the set of Pods running in one moment in time could be different from the set of Pods running that application a moment later. This leads to a problem: if some set of Pods (call them “backends”) provides functionality to other Pods (call them “frontends”) inside your cluster, how do the frontends find out and keep track of which IP address to connect to, so that the frontend can use the backend part of the workload? Enter Services.
                                          • If you’re able to use Kubernetes APIs for service discovery in your application, you can query the API server for Endpoints, that get updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers ways to place a network port or load balancer in between your application and the backend Pods.
                                          • A Service in Kubernetes is a REST object, similar to a Pod. Like all of the REST objects, you can POST a Service definition to the API server to create a new instance. The name of a Service object must be a valid DNS label name.
                                          1. Volume

                                            Annotations:

                                            • On-disk files in a Container are ephemeral, which presents some problems for non-trivial applications when running in Containers. First, when a Container crashes, kubelet will restart it, but the files will be lost - the Container starts with a clean state. Second, when running Containers together in a Pod it is often necessary to share files between those Containers. The Kubernetes Volume abstraction solves both of these problems.
                                            1. types
                                              1. EBS - AWS Elastic Block Store

                                                Annotations:

                                                • https://aws.amazon.com/pt/ebs/?ebs-whats-new.sort-by=item.additionalFields.postDateTime&ebs-whats-new.sort-order=desc
                                                • O Amazon Elastic Block Store (EBS) é um serviço de armazenamento de blocos de alta performance fácil de usar projetado para o uso com o Amazon Elastic Compute Cloud (EC2), tanto para cargas de trabalho com alta taxa de transferência de dados quanto com intenso consumo de transações em qualquer escala. Várias cargas de trabalho, como bancos de dados relacionais e não relacionais, aplicativos corporativos, aplicativos em contêiner, mecanismos de análise de big data, sistemas de arquivos e fluxos de trabalho de mídia são amplamente empregados no Amazon EBS.Você pode escolher entre quatro tipos de volume diferentes para equilibrar preço e desempenho ideais. Você pode alcançar latência abaixo de 10 milissegundos para cargas de trabalho de bancos de dados de alta performance, como o SAP HANA, ou transferência de dados de um gigabyte por segundo para cargas de trabalho sequenciais grandes, como o Hadoop. Você pode alterar os tipos de volume, ajustar a performance ou aumentar o tamanho do volume sem interromper seus aplicativos essenciais, assim terá armazenamento econômico quando precisar. Projetados para sistemas essenciais à missão, os volumes EBS são replicados em uma zona de disponibilidade (AZ) e podem ser facilmente escalonados para petabytes de dados. Além disso, é possível usar o EBS Snapshots com políticas de ciclo de vida automatizadas para fazer backup de seus volumes no Amazon S3 e, ao mesmo tempo, garantir a proteção geográfica de seus dados e da continuidade de negócios.
                                                1. azureDisk
                                                  1. NFS
                                                    1. Examples

                                                      Annotations:

                                                      • > awsElasticBlockStore > azureDisk > azureFile > cephfs > cinder > configMap > csi > downwardAPI > emptyDir > fc (fibre channel) > flexVolume > flocker > gcePersistentDisk > gitRepo (deprecated) > glusterfs > hostPath > iscsi > local > nfs > persistentVolumeClaim > projected > portworxVolume > quobyte > rbd > scaleIO > secret > storageos > vsphereVolume
                                                  2. Namespace

                                                    Annotations:

                                                    • Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.
                                                    • Most Kubernetes resources (e.g. pods, services, replication controllers, and others) are in some namespaces. However namespace resources are not themselves in a namespace. And low-level resources, such as nodes and persistentVolumes, are not in any namespace. To see which Kubernetes resources are and aren’t in a namespace:
                                                  Show full summary Hide full summary

                                                  Similar

                                                  To Kill A Mockingbird Complete Notes
                                                  jessica.moscrip
                                                  Plant Structure and Photosynthesis
                                                  Evangeline Taylor
                                                  Present Simple vs. Present Continuous
                                                  Marek Mazur
                                                  An Inspector Calls: Eric Birling
                                                  Rattan Bhorjee
                                                  GCSE REVISION TIMETABLE
                                                  TheJileyProducti
                                                  Rights and Responsibilities Flashcards - Edexcel GCSE Religious Studies Unit 8
                                                  nicolalennon12
                                                  Mind Maps with GoConqr
                                                  croconnor
                                                  The Strange Case of Dr. Jekyll and Mr. Hyde
                                                  K d
                                                  French Revolution quiz
                                                  Sarah Egan
                                                  Using GoConqr to study History
                                                  Sarah Egan
                                                  Meteorologia I
                                                  Adriana Forero