Kubernetes is a system developed by Google to manage containerized applications in a clustered environment. It is primarily meant to address the gap between the modern cluster infrastructure and the presumptions of majority of applications about the environments.
Remote containers orchestrator is majorly handled by kubernetes.
Main features of kubernetes are :
- Load balancing
- Service discovery
- Secrets/configuration/Storage management
- Health checks
- Auto scaling, restart, healing of containers and nodes
- Zero downtime deploys
Kubernetes master is the main commanding service in kubernetes cluster. Master acts as an administrator for managing the cluster wide nodes. These services can be installed on a multiple machines or single machine.
Master or control plane components:
Etcd: Kubernetes uses etcd, which is a distributed key-value store that can be distributed across nodes, to store configuration data that can be used by each of the container cluster. It can be configured on a single master server or distributed among various machines while ensuring its connectivity to each of kubernetes machines.
API Server: It is the management point of the entire cluster which allows for configuration of Kubernetes workloads and organizational units. It acts as a bridge between various components to maintain the cluster health.
Controller Manager Service: It is the one which maintains the state of the cluster which reads the latest updates and implements the procedure to fulfill the desired state. Scaling of application up or down and adjusting endpoints can be possible by using controller manager service.
Scheduler Service: This assigns the workload to the nodes and tracks resource utilization on each host to ensure that they are not overloaded.
NODE SERVER COMPONENTS
Are the one on which actual work is done. They have the following requirements to communicate with the master components and configure networking for containers:
Docker running as a dedicated subnet
Kubelet service: The main contact point with master components and is a service. It receives commands and work and interacts with etcd to read configuration details of the nodes.
Proxy Service: Used to deal with the individual host level sub-netting and make the services available to external parties through forwarding the requests to the correct containers.
Kubernetes Work Units: While containers are the used to deploy applications, the workloads that define each type of work are specific to Kubernetes.
Pods: The basic unit which generally represents one or more containers that should be controlled as a single environment or application. It acts as a tightly coupled multiple containers meant for application. In Pod, Horizontal scaling is generally discouraged on the pod level because other kunernetes features are configured for this purpose.
Services: A service, when described this way, is a unit that acts as a basic load balancer and ambassador for other containers. A service groups together logical collection of pods that perform the same function to present them as a single entity. Services are an front-end to a group of containers so that consumers do not have to worry about anything beyond a single access location.
Replicated Pods are the complex version of a pod family. These pods are handled by a replication controller.
Horizontal scaling of pods can be control using the replication controller framework. This can be achieved by writing custom templates which contains complete pod definition. This is wrapped with additional details about the replication work that should be done.
In a micro services architecture, for deploying the applications in a high-availability mode kubernetes plays a key role. After creating the new projects in kubernetes the services can be load balanced and made them accessible from outside network can be a configurable through kubernetes. Controlling of
Kubernetes can be used for creating Projects, developing Services and adding them to Routes to be accessible from remote internet, Pods can be created and controlled the load balancing and scaling of pods and troubleshooting pods through SSH and logs, writing/modification of Build configs, templates, Image streams etc
In Kubernetes, pod contains one or more containers. Containers in a pod are deployed together, and are started, stopped, and replicated as a group. An example of pod is let us taking a micro service application with database which can run together including shared network and storage resources.
Replication controllers are responsible for creation, scaling and remove the pods and manages the deployment of pods to the cluster nodes. For example, in case of a node shutdown, the replication controller moves the pods to other nodes to ensure the desired number of replicas for this pod is available.
Kubernetes services provide the connectivity with a load balancing proxy for multiple pods that belong to a particular service. On which node runs a pods for the service can be abstracted using this service feature of kubernetes. Every pod could have multiple labels which are used to select resources for the operation. For example, a replication controller and services discover pods by label selectors for various operations.