Kubernetes Flashcards
Why might it be a bad idea to have 4 masters in the control plane?
Due to the way in which decisions are made. When you have an odd number of controller it is easier for a set number of nodes in communication to elect a leader.
What parts make up a master?
- API Server - kube-apiserver
- Cluster Store - etcd Performance is critical
- Controller Manager - kube-controller-manager
- Scheduler-scheduler
What are the important parts of a kubernetes node?
- Kubelet
- Main Kubernetes agent
- Registers node with Cluster
- Reports back to masters
- Container Runtime
- Used to always be Docker and mostly still is
- Usually containerd
- See gVisor and Katacontainers
- Kube-Proxy
- Networking Component
- Making sure every pod gets its own IP
- individual containers in a pod you get to via a port
- Basic loadbalancing
What is the manifest in Kubernetes?
A declaritive description of the desired state of the cluster.
TBD Something about reconcilliation loops
What is a Pod?
The Atomic unit of scheduling in Kubernetes.
A shared execution environment.
Containers will share various resources in there e.g. IP Addresses, Volumes, memory
Generally we only use one container per pod but there are specialist usecases where we do this. Common use case is a service mesh.
Contrast this with a VM for Virtualized infra or a container in docker. We cannot deploy a container alone in Kubernetes it nees to be in a Pod.
What percentage of the containers in a Pod must be up and running for a Pod to be Considered online?
100%, all of them
Can you split a pod across nodes?
No all parts of a Pod run on the same node.
When a Pod is recreated can you depend on the IP being the same?
Generally no as far as I know.
Kubernetes service object is the solution for this. It gives us a stable IP and name to the let us access the ephemeral and changing pods.
How does a service object decide which pods it should be loadbalancing traffic to?
At a high level its based on the labels the service and pods share.
What is etcd?
Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data.
What is kube-apiserver?
The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.
What is kube-scheduler?
Control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.
What is kube-controller-manager?
Control plane component that runs controller processes.
Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.
Describe the layers of a kubernetes deployment?
Deployment
Replica Set
Pod
App
This may need some work I think the instructor was simplifying things.