Chapter 6: Container Orchestration Flashcards
What questions/concerns do container orchestration tools address? Name 5 tasks
- How to group multiple host together to form a cluster and manage them as a single compute unit?
- How to schedule containers to run on specific hosts?
- How can containers running on one host communicate with containers running on other hosts?
- How to **provide **containers with dependent storage when it is scheduled on a specific host?
- How to access a container through a server name instead of accessing it directly through their IP addresses?
What is container orchestration? What does it encompass?
- umbrella concept, encompassing container scheduling and cluster management
How is container orchestration achieved?
- through policy-driven mechanism
- that automates the decision process that distributes containers across the nodes of the cluster
- this decision process is aided by cluster management aspects like state of the exisitng workload and cluster node resource availability
What is enabled through the cluster management orchestrators?
- management of resources of cluster nodes
- as well as adding and deletion of node through cluster scaling mechanism
What is Kubernetes?
- Apache 2.0 licensed open source project for automating deployment, operations and scaling of containerized applications
- started in 2014 by Google, IP transferred 2015 to Cloud Native Computing Foundation (CNCF), non-profit organization
What container runtimes are supported by Kubernetes?
- CRI-O
- containerd
- Docker Engine
- Miratins Container Runtime
- may change with matury of Kubernetes project
What are the main components of the kubernetes architecture?
- cloud-control-manager (optional)
- kube-api-server
- scheduler
- etcd (persistent store)
- Controller Manager
- kubelet
- kube-proxy
- CRI
- pod(s)
How is a Cluster made up?
- Control Plane containing cloud-control-manager, kube-api-server, Controller Manager, scheduler and etcd
- nodes each containing kubelet, kube-proxy and CRI, which contains pods
- from each node kubelet and kube-proxy communicate with kube-api-server
- cloud control manager, controller manager, scheduler and etcd communicate with kube-api-server
- cloud control manager communicates with the outside Cloud provider API
What are the key components/elements of kubernetes?
- Cluster
- Control-Plane-Node
- Worker-Node
- Namespace
What is a Cluster?
- collection of systems (bare-metal or virtual) and other infrastructure resources used by Kubernetes to run containerized applications
What is a Control-Plane Node? What does it do?
- a system that:
- takes containerized workload scheduling decisions
- manages worker nodes
- enforces access control policies
- reconciles changes in the state of the cluster
- delegates container management tasks to worker node agens
What are the main components of a Control-Plane Node?
- kube-api server
- etcd
- kube controller manager
- cloud controller manager
- kube-scheduler
How many Control Plane nodes are usually found within a container?
- multiple can be found as a solution for High Availability
What are Worker Nodes?
- system where containers are schedules to run workload management units called pods
How do Worker nodes function?
- runs a kubelet named daemon responsible for intercepting instructions related to container deployment and lifecycle management
- these instructions are comming from kube-apiserver
- the node delegates such tasks to the container runtime, found on the node
- implements container health checks, enforces resource utilization limits and reports node status back to the kube-apiserver
What function does the kube-proxy of a Worker node have?
- is a network proxy
- enables applications running in the cluster to be accessible by external requests
Where can kubelets and kube-proxies as well as container runtimes be found?
- on worker nodes
- on control-plane nodes
What does a namespace enable?
- allows logical partition of the cluster into virtual sub-clusters by segregating the cluster’s resources
- addressing the multi-tenancy requirements of enterprises requiring an isolation method for their projects, applications, users, and teams
What are the key API resources of the Kubernetes architecture?
- Pod
- ReplicaSet
- Deployment
- DaemonSet
- Service
- Label
- Selector
- Volume
What is a pod?
- smalles deployment unit in Kubernetes
- logical workload management unit
- enabling co-location of a group of containers with shared dependencies such as storage volumes
- often managing a single container and its dependencies such as Secrets or ConfigMaps
- can be created independently
- but lacks than self-healing, scaling and seamless updates capabilities
- usually managed by controller programs or operators such as ReplicaSet, Deployment, DaemonSet or StatefulSet
What is ReplicaSet API resource?
- mid-level controller or operator
- manages the lifecycle of pods
- rolls out desired amount of pod replicas
- uses state reconcilliation to ensure that desired number of application pods is running at all times
- enables self-heal if an application pod is lost unexpectedly
What is the Deployment API resource?
- top-level controller
- allows declarative updates for pods and ReplicaSets
- can be defined to create new resources or to replace existing ones with new ones
- represents the default stateless application rollout mechanism
What is the DaemonSet API resource?
- controller or operator
- that manages the lifecycle of node agent pods
- rolls out a desired amount of pod replicas while ensuring that each cluster node will run exactly one application pod replica
- uses reconciliation to ensure that the desired number of application pod replicas is running at all times
- self-heal the application if a pod replica is unexpectedly lost due
What are typical Deployment use cases?
- Create a Deployment to roll out a desired amount of pods with a ReplicaSet
- Check the status of a deployment to see if the rollout was successful or not
- later update the deployment to recreate the pods (use a new image) - through the Rolling Update Mechanism
- roll back to an earliert Deployment revision if the current Deployment isnt stable
- scale, pause and resume a deployment
What is the Service API resource?
- traffic routing unit
- implemented by kube-proxy
- provides a load-balancing access interface to a logical grouping of pods, typically managed by the same operator
- enables applicatons with a DNS name registrations, name resolution to a private/cluster internal static IP
- can reference a single pod or set of pods managed by ReplicaSet, Deployments, DaemonSets or StatefulSets
What is the Label API resource?
- arbitrary key-value pair attached to resources
- typically used to tag resources of a particular application, such as pods or deployments to logically group them for management purposes - for updates, scaling, or traffic routing
What is the Selector API resource?
- allows controllers or operators to seach for resources or groups of resources described by a desired key-value pair labels
What is the Volume API resource?
- abstraction layer implemented through Kubernetes plugins and third-party driver
- aimed to provide simplified and flexible method of container storage management in Kubernetes
- Volume containers are able to mount local host storage, network storage, distributed storage clusters, cloud storage services seamlessly
What options do exist for Kubernetes in public clouds?
- clusters can be managed by yourself
- hosted (managed) Kubernetes services, where management tasks are performed by cloud services providers
What are examples for hosted solutions available for Kubernetes?
- Amazon Elastic Kubernetes Services
- Azure Kubernetes Services (AKS)
- Google Kubernetes Engine
- IBM Cloud Kubernetes Services
- Red Hat OpenShift
What do Kubernetes Platform solutions offer?
- a managed Kubernetes environment flexible enough, to be deployed on any public cloud, multi-cloud or on-premises/private cloud
- eliminating vendor lock-in
What are examples for Kubernetes Platforms?
- Managed Kubernetes
- Kubermatic Kubernetes Platform
- Platform9 Managed Kubernetes (PMK)
- Ranchers Kubernetes Engine (RKE)