L8 - Platform as a Service (PaaS) - Kubernetes 2/2 Flashcards
What are web containers supported by?
A helper container that pulls the latest content.
How do pods create the environment for containers?
- unique IP address, shared memory etcs.
- containers inside a Pod use ports on the Pods’ localhost interface
How do pods have their own network namespace
Single IP address, single range of TCP ports and a routing table
How does external access to a container in a Pod take place?
- Pod IP address combined with the port of the container
How does container-to-container communication in a Pod work?
localhost adapter and port number
4 characteristics of pods
- Units of scheduling (scaling through adding or removing pods)
- Atomic units (starting or stopping pods will start and stop all containers)
- Mortal (a replacement Pod will have a new ID and IP and might run on another node)
- Managed by higher-level controllers (deployment, daemonSet, StatefulSet)
What does daemonSet do?
Ensures a Pod is running on each node
What does StatefulSet do?
StatefulSet is a Kubernetes object that manages a set of replicated pods, ensuring that each pod has a unique, persistent network identity and that the pods are deployed in a predictable order. StatefulSets are used for applications that require stable, unique network identities and persistent storage, such as databases, message brokers, and caches.
Adds guarantees and ordering and uniqueness of Pods
What is a Pod Network?
- for Pod-to-Pod communication
- K8s sets up bridge networks and routing tables such that Pods can reach other Pods via their IP address
What are examples of Pod Networks?
AWS VPC Container Network Interface (CNI), Calico
How are a Pod’s resources limited?
Through cgroups.
What do cgroups do?
- specify the resource limits for CPU, RAM, IOPS
What are the resource limits of Pods?
The aggregated limits of the containers plus possibly some Pod overhead
How is a pod created?
- Define a Pod in a manifest
- POST manifest to API server
- Schedule a Pod on a cluster
4 characteristics of Pod deployment
- Self-healing: failed Pods are replaced
- Scaling: # of replicas in ReplicaSet can be adapted as required & current state is adapted to match desired one
- Rolling update
- Versioned rolling update