Basics Flashcards
Kubernetes is composed of two separate planes:
Control Plane and Data plane
What does this statement refer to?: machines that can run containerized workloads. Each node is managed by the kubelet, an agent that receives commands from the control plane.
Kubernetes data plane
What does this statement refer to?: manages Kubernetes clusters and the workloads running on them. Include components like the API Server, Scheduler, and Controller Manager.
Kubernetes control plane
What is the smallest unit of Kubernetes?
The pod. A pod typically includes several containers, which together form a functional unit or microservice.
Why is persistent storage important?
local storage on Kubernetes nodes is ephemeral, and is deleted when a pod shuts down. This can make it difficult to run stateful applications. Kubernetes provides the Persistent Volumes (PV) mechanism, allowing containerized applications to store data beyond the lifetime of a pod or node.
________ is a database that stores information in a key value format.
ETCD Cluster
______________is a control plane process which assigns Pods to Nodes. ______________determines which Nodes are valid placements for each Pod in the scheduling queue according to constraints and available resources. _____________then ranks each valid Node and binds the Pod to a suitable Node.
The scheduler
the ____________ is responsible for orchestrating all operations within the cluster.
kube-apiserver
the ______________ is an agent that runs on each node in a cluster, it deploys or destroys containers in the node as required. It listens from instructions from the kube-apiserver.
kubelet
what does the kube-proxy do?
Its responsible for the communication between services within the cluster.
The master node is comprised by:
ETCD Cluster, kube-apiserver, kube Controller Manager and Kube-scheduler.
The worker nodes are comprised by:
the kubelet, kube-proxy and the container runtime engine.
Reminisce on Docker and Containerd history and how Kubernetes only kept docker’s daemon rather than also sticking with the other componentes like the volumes, image building features, etc:
Kubernetes used to rely on Docker to manage containers, but it only needed Docker’s container runtime, not the extra features like image building. To make things simpler, Kubernetes switched to using containerd, which is the part of Docker that actually runs containers. They removed support for Docker through something called dockershim. This change made Kubernetes faster and more efficient because it could talk directly to containerd without needing Docker in the middle.
why use nerdctl cli over ctr cli?
ctr is for debugging purposes only and its not the most user friendly tool. Contrary to nerdctl as it provides a Docker-like CLI for containerD.
what is a key value store?
a key value store stores information in the form of forms or documents. Changing one file doesnt affect the others.
True or false: every change made to the cluster is updated in the etcd server, only then, is the change considered to be complete.
True
Default port on which etcd listens
2379
What are the implications of deploying a cluster from scratch:
- You install and configure each component manually (etcd, API server, scheduler, controller manager, kubelet, kube-proxy).
- Gives complete control over the configuration.
- Requires deep knowledge of Kubernetes internals.
What are the implications of using Kubeadm for the deployment of the Cluster:
- Automated setup
- Follows best practices by default.
- Some configurations are abstracted away for simplicity.
There are two things that need to be specified when using etcdctl api (the first thing is necessary for commands to be usable and the second one is for authentication purposes):
1) Its necessary to specify api version (its possible to choose between version 2 and 3):
export ETCDCTL_API=3
2) Its necessary to specify the path where the ssl certificate is.
The only component that interacts directly with etcdserver is:
the kube-api server
What does the kube controller manager do?
It watches the API server for changes (like creating or deleting Pods) and makes sure the cluster matches the desired state.
For example, if a Pod crashes, it notices and starts a new one to replace it.
What things does the kubecontroller manager admins:
the node controller - health checks
replication controller - ensures the right number of read replicas are runnning.
endpoint controller - updates endpoints objects when services or pods change.
service account & token controllers - manages service accounts and their access tokens.
What is the node monitor period?
5 seconds