Components of Kubernetes Flashcards
What is a pod?
A pod is the basic unit inside Kubernetes cluster.
What is a pod responsible for?
Running containers. It also controls the execution of that container.
What makes a pod die
When all the containers in the pod die
Does a pod provide a way to set environment variables, mount storage, and feed other information into a container.
Yes.
What are the same resources all containers with a pod share
IP, storage, and RAM
What is a Node?
A collection of pods. It is a physical or virtual machine
How many types of nodes are there? Specify them
- Master node and worker node.
How many pods a worker node can hold?
1 or more pods
How many components are there in the worker node
3.
Kubelet process.
A Container Runtime Engine.
Kube-proxy.
Can you configure a master node to be a worker node?
Yes. But it’s not recommended for production purposes.
What does a Container Runtime do?
Run and manage a container’s life cycle
What is a Kubelet process?
A process that runs on all worker nodes in the cluster
What does a Kubelet process do?
- Takes instructions from the control plane to manage the state of the node.
- Collects performance and health information of the pods and their containers, and share that with the control plane to make scheduling decisions
- Connects to the run time engine using the Container Runtime Interface (CRI)
What is a Kube proxy?
An implementation of a network proxy that’s present on every node.
What is a Kube proxy responsible for?
- Routing traffic to the appropriate pod based on the incoming IP address
- Exposes the node externally
- Prevents IP conflicts on the pods
- Responsible for port mappings.
- Load balancer for the services running on the node.
What does a master node do?
Managing the other worker nodes and scheduling workloads on them (including deploying, starting up or destroying objects on worker nodes in order to meet the desired state).
If a service running on any pod of a worker node goes down, the master communicates with all the worker nodes in the cluster on how to re-route the traffic based on new container alignments.
Provides the control plane
How can adminds access the Kubernetes master node to manage the Kubernetes cluster?
- kubectl (command-line interface)
2. Dashboard UI (web-based user interface)
What are the four components of the master node?
- API server
- etcd
- Scheduler
- Controller Manager
What are these 4 components also known as?
Kubernetes Control Plane
What is the key management component of the entire cluster?
API Server.
What is an API server?
The main access point to the cluster.
What is the API server responsible for?
Provides both internal and external interfaces.
Updates the etcd with the changes in the cluster and it invokes the Scheduler and kubelet process when a new pod is created.
Responsible for the authentication and authorization
What is a etcd
Persistent and distributed key-value store that contains the state and configuration data for the entire cluster.
Where can etcd be configured?
On the master node or externally.
Why does a node need etcd
Because it needs to learn how to maintain configuration of its running containers.
How many ways are there to run a etcd
2 ways.
Distributed Database: multi-master nodes cluster
Standalone Database: single-master node cluster
How to prevent conflicts between master nodes in a distributed database?
Implements logs.
What is a Scheduler responsible for?
- Assigning newly created and unscheduled pods to nodes.
- ## The scheduler must know the resource requirements, resource availability, and other user-provided constraints to maximize proper resource utilization
What does a Controller Manager do?
- Supervises different controllers that drive actual cluster state toward the desired cluster state.
- Communicates with the API server to create, update, and delete the resources it manages (pods, service endpoints, etc.).
- Watches the state of the cluster through the API server and makes the necessary changes to move the cluster from current state* present in the etcd to the desired state defined in the configuration file*.
Which of the following best describes a Kubernetes node?
a) A component of the API server used to schedule workloads
b) The smallest entity in Kubernetes, for a single container plus dependencies
c) A machine used to run Kubernetes workloads.
d) A group of machines used to run the Kubernetes API server
C