Get Started With Kubernetes!
Kubernetes is an orchestration tool that can help achieve high availability, scalability, and disaster recovery. The image above shows A Kubernetes Cluster.
The Kubernetes Master
API Server — It's an entry point. As you can see in the image above, this is the area of communication.
ETCD — A distributed database because Kubernetes runs on several machines at one time. ETCD stores across a cluster and watch for changes related to the data.
Scheduler — Watches for newly created Pods that have no Node assigned. So for every pod, the scheduler finds a Node for the pod to run on.
Controller manager — Watches the cluster's shared state through the API server and makes changes to move the current state towards the desired state.
Nodes
Nodes — This is a worker machine managed by the control plane.
Pods — Runs on a node and is the smallest unit of execution.
Container — Located inside a pod. It is a ready-to-run software and managed as a single entity—for example, Docker.
It is cool to have multiple nodes and numerous pods using Kubernetes(k8), and apps can run efficiently.
Lets Start-Up That Cluster using Minikube
I am using Mac to start up a cluster.
Prerequisites:
- It's essential to have a fundamental understanding of the tool Docker. So please check it out if you have not gotten there yet, and I encourage you to explore.
Tools you need to download to begin :
Open Docker
Once Docker is installed on your Mac, head over to the dashboard. Go to Preferences → Click on the Kubernetes Tab and enable Kubernetes. Enabling Kubernetes on Docker allows you to start a Kubernetes cluster.
Open the CLI
Minikube is a tool you can use to run k8 on your local machine. You can create a single node cluster. Using minikube is a great way to learn.
Copy the command below, if you have minikube installed. If you don't have minikube installed, click here.
minikube version
Kubectle is a command-line tool that allows you to run commands against Kubernetes clusters.
Kubectle is used to :
- Deploying applications
- Inspecting and managing cluster resources
- Viewing logs
Make sure you have kubectle installed, and you can see the latest version. If you do not have kubectle installed, you can click here.
kubectle version
To start minikube on your local machine, you can copy the command below. I thought it was pretty cool to see my “minikube” container on the docker dashboard as soon as I started.
minikube start
It's also great to know the details of the cluster. There is a command for viewing information about the cluster; take a look!
kubectl cluster-info
Since you may know what nodes are. Take a look closer at the single node created after typing in the command below. The command below shows all nodes to host our applications. After entering the command, the name, status, roles, age, and version will appear.
kubectl get nodes
It's time to explore a little more! First, take a look at minikube dashboard. I thought it was super interesting.
Uses:
- Deploy containerized applications to a Kubernetes cluster
- Troubleshoot your containerized application
- Manage the cluster resources
- Get an overview of applications running on your cluster
- Create or modify individual Kubernetes resources
minikube dashboard
Case Study
I love Adidas! Beyonce is constantly dropping fire collections from IVY PARK. Let me get to the point here. Adidas uses Kubernetes to run 100% of their e-commerce site. Load time for the Adidas site was reduced, and releases went from 4–6 weeks to 3–4 times a day. I am amazed that Adidas could have 4,000 pods, 200 nodes, and 80,000 builds per month. Adidas improved by shortening its time to get a project up and running and into the Adidas infrastructure.
❁ Feel free to provide feedback, and if you like what you read, follow me for more.