
FAQs about Kubernetes
A Kubernetes cluster is a collection of node machines that run containerized applications. A cluster has at least one worker node and one master node.
The main advantage of a Kubernetes cluster is the ability to schedule and run containers on a group of machines, whether physical or virtual, on-premises or in the cloud. Kubernetes containers are not tied to any individual machine or instance.
The cluster can be scaled horizontally and vertically.
- Horizontal scaling is based on increasing the number of pods for the same service so that the workload is spread over a larger number of pods.
kubectl scale --replicas = 5 deployment /
Vertical scaling seeks to add more resources to the cluster, either by adding more resources to existing machines or instances or by adding new nodes. The vertical scaling policy will depend on the platform on which the cluster is deployed, on-premises or in the cloud.
- Pod: set of one or more containers deployed on a single node. It is the smallest and simplest object in Kubernetes.
- Service- A way to expose an application running in a set of pods as a network service.
- Volume- Directory containing data, accessible by containers in a pod. A Kubernetes volume has the same lifespan as the pod that contains it. However, the data is preserved when either of them is restarted.
- Namespace (namespace): virtual cluster. Namespaces allow Kubernetes to manage multiple clusters (for different teams or projects) within the same physical cluster.
Node master is in charge of maintaining the desired state of the cluster and controlling the applications that are running and the containerized images that are used. To do this, the master node executes the following processes:
- etcd: Etcd is a database of type (key, value) that is used to maintain the global configuration of the cluster.
- Kube-apiserver:nodes master expose an API that is used to nodes working and clients of the cluster to communicate.
- kube-scheduler: it is the Kubernetes component in charge of deciding on which node a certain container runs.
- kube-controller-manager: it is in charge of executing the different controllers. A “controller” is in charge of ensuring that the desired state of the application and the cluster is met at all times (eg, that there are 5 instances of a given container at all times).
In the absence of a master node, the cluster would not be able to perform the previously stated functions, so the Kubernetes functions would be greatly affected.
