CompTIA Linux+ (XK0-004)
Red Hat Enterprise Linux
Git and Github
Learn Docker and Kubernates
Tips and Tricks

2. What is Kubernetes?

What is Kubernetes?

Kubernetes helps in managing containerized workloads and services. Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.

Kubernetes automates the distribution and scheduling of application containers across a cluster in a more efficient way.

A Kubernetes cluster consists of two types of resources:

  • The Master coordinates the cluster

  • Nodes are the workers that run applications

Cluster Diagram
  • The Master is responsible for managing the cluster. The master coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.

  • A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster.

A Kubernetes cluster that handles production traffic should have a minimum of three nodes.

Kubernetes Development

To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete.

$ minikube version # check version
$ minikube start # start the cluster
$ kubectl version # kubectl version
$ kubectl cluster-info # cluster information
$ kubectl get node # View the nodes in the cluster

Kubernetes Deployments

Once the Kubernetes cluster is running, we can deploy our containerized applications on top of it. To do so, we require a Kubernates Deployment configuration.

You can create and manage a Deployment by using the Kubernetes command line interface, Kubectl. Kubectl uses the Kubernetes API to interact with the cluster.

Pod: A Kubernetes Pod is a group of one or more Containers, tied together for the purposes of administration and networking. A Pod is a group of one or more containers, with shared storage/network resources, and a specification for how to run the containers.

  • A Pod is used to host your application instance.

  • A Pod always runs on a Node.