Introduction to Kubernetes cluster
Kubernetes is designed as a highly available cluster of computers that are connected to work as a single unit. This abstraction allows us to deploy applications without thinking about which specific machines they need to run on. To make use of this new model of deployment, applications need to be packaged in a way that decouples them from individual hosts: they need to be containerized. This is different compared to how applications were deployed in the past, when they were directly installed on specific machines as packages deeply integrated into the host. Kubernetes role is to automate the distribution (scheduling) of application containers across a cluster in an efficient way. Kubernetes is an open-source platform and is production-ready.
A Kubernetes cluster is formed out of 2 types of resources:
- Master is coordinating the cluster
- Nodes are where we run applications
- Kubernetes cluster
Kubernetes is a production-grade, open-source platform that orchestrates the placement (scheduling) and execution of application containers within and across computer clusters.
The Master is responsible for managing the cluster. The master nodes will coordinate all the activity happening in your cluster like scheduling applications, maintaining their desired state, scaling applications and rolling new updates.
A node is a VM or a physical computer that is used as a worker machine in a Kubernetes cluster. Every node from the cluster is managed by the master. On a typical node you will have tools for handling container operations (like Docker, rkt) and Kubelet, an agent for managing the node. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.
Masters manage the cluster and the nodes are used to host the running applications.
When we deploy applications on Kubernetes we tell the master to start our containers and it will schedule them to run on some node agents. Communications between the master and the nodes is done via an API exposed by the master. The same API is exposed towards the users in order to facilitate interaction with the cluster.
A Kubernetes cluster can be deployed on either physical or virtual machines. The recommended way to start a Kubernetes cluster for development purposes is by using minikube. Minikube creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The minikube CLI provides basic bootstrapping operations such as: start, stop, status and delete. During this bootcamp we’ll use an online terminal with minikube pre-installed.
The name Kubernetes originates from Greek, meaning “helmsman” or “pilot”, and is the root of the words “governor” and “cybernetic”. K8s is an abbreviation obtained by replacing the 8 letters “ubernete” with 8.
Now that you know what Kubernetes is, let’s go to the online tutorial and start our first cluster!