What Is Kubernetes?
Kubernetes is an open-source container orchestration technology developed by Google to help manage containerized applications in different deployment environments.
It helps us to manage applications consisting of hundreds or thousands of containers in different environments (physical, virtual, or cloud). We can use this orchestration tool to manage our scaling requirements, failover, deployment patterns, and more.
What Can We Use Kubernetes For?
An orchestration tool like Kubernetes has several advantages for developers and the Operations team. Alongside making it easier to improve, deploy, and control software programs, here are some other services Kubernetes offers:
Storage Orchestration
Self-Healing
Load Balancing and Service Discovery
Secrets and Configuration Management
CI/CD: Software Development Life Cycle
Kubernetes Architecture.
Master Node
Every cluster comprises at least one master node, which hosts the Kubernetes Control Plane controlling and managing the entire Kubernetes system. The master node holds all crucial processes running within your Kubernetes application. A couple of worker nodes are connected to this master node, but they are less valuable to the cluster than the master node. Importantly, if you lose access to the master node, you’ll lose access to the cluster altogether.
Worker Nodes
Worker nodes are what run the applications you deploy. Each worker node comprises multiple containers of different applications running on it. They’re big and contain many resources, and consequently, the worker node does most of the workload on your Kubernetes application. The worker nodes have a kubelet process designed to run on them.
Controller Manager
The controller manager keeps an overview of activities happening in the cluster and handles repairs, replicating components, and restarting containers.
ETCD
ETCD is key-value storage designed to back up the storage. It contains configuration data insights and status data of each node and each container in the node. Kubernetes’ backup and repair capabilities are viable due to the ETCD snapshot.
API Server
This is the entry point to a Kubernetes cluster—the point where Kubernetes clients communicate with the cluster. This communication can happen through the user interface (UI) if you use the Kubernetes dashboard, an API using scripts, and a command-line tool.
Scheduler
The scheduler is an intelligent process designed to handle pod placement. It schedules containers on different nodes based on their workload-available server resources. Scheduler occasionally decides which worker node containers should be scheduled.
Kubernetes Installation and Configuration: minikube
minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.
All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start
What you’ll need
2 CPUs or more
2GB of free memory
20GB of free disk space
Internet connection
Container or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation
To install the latest minikube stable release on x86-64 Linux using binary download:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
Start your cluster
From a terminal with administrator access (but not logged in as root), run:
minikube start
If minikube fails to start, see the drivers page for help setting up a compatible container or virtual-machine manager.
3Interact with your cluster
If you already have kubectl installed, you can now use it to access your shiny new cluster:
kubectl get po -A
Alternatively, minikube can download the appropriate version of kubectl and you should be able to use it like this:
minikube kubectl -- get po -A
You can also make your life easier by adding the following to your shell config:
alias kubectl="minikube kubectl --"
Initially, some services such as the storage-provisioner, may not yet be in a Running state. This is a normal condition during cluster bring-up, and will resolve itself momentarily. For additional insight into your cluster state, minikube bundles the Kubernetes Dashboard, allowing you to get easily acclimated to your new environment:
minikube dashboard