Kubernetes for all!
13 January 2020
Christian Candelaria
if [[ “$ContainerKnowledge” = false ]]; then echo “Read my blog: Docker & Containers” else echo “Proceed and have fun!” fi
You are here because you love containers or at least you are interested in the topic at hand. It is innovative, it is easy, it has several advantages and the best of all it is fun! Now I already managed 1, 2, 3, 4 until 5 containers by hand. (4 or 5 is already a bit tricky, believe me…) That said, I can’t imagine myself managing tons of containers manually. So guess what? Just automate it! Luckily there is a fun way to do it! Let me explain “Kuber…netes” or K8s in short (k + 8characters + s, ya dig?).
An introduction to K8s
K8s is an open source project that provides a platform designed to automate the deployment, scaling, and management of containerized applications. “Owkay!”, let’s break that in pieces before I cause you brain damage.
So what will K8s do for you? K8s will…
- … scale your application horizontally on demand or automatically based on CPU usage.
- … roll-out/roll-back changes that have been made in the application.
- … restart containers automatically after failing.
- … automatically mount a storage of your choice.
“And the list goes on and on.”, FYI, it really has several other features like batch execution, service discovery, load balancing, secret and configuration management. Therefore, it is the prince for a container! “Hmmm”, maybe not a good comparison as the prince will manage more than 1 container. However… K8s is a good choice to schedule your container needs.
Here are a few facts in between to feed your brain:
- K8s was originally developed by Google then donated to the Cloud Native Computing Foundation (CNCF).
- K8s is the most popular container manager.
- K8s can’t function without a container runtime and at the moment Docker Engine is the most common used runtime for K8s.
Architecture
What does the bone structure of K8s look like? I wont tread into too much detail, but just stick to the tip of the iceberg. K8s consists of 1 or more master node(s) and 1 or more worker node(s). Tasks will first go to the master and the master node will schedule the task to the nodes. Just think about it as a master and slave principle (metaphorically). K8s can run on your choice of infrastructure: physical or virtual, private or public cloud and hybrid cloud infrastructure is also an option. You can interact with k8s on two ways via the CLI tool or the GUI. Just to mention if you are a real engineer, then: “You will use the CLI!”.
That said, K8s is not the only option for container management. The alternatives are just not commonly used so for now let’s just stick with K8s. Also, K8s is an open source community where engineers, from companies all over the world including Google and Redhat, are actively contributing to the project. Based on that, just contribute and let us work together for the future!
Getting started with Kubernetes (Centos 7)
Here is a little fun/easy way to create your first (or last) Kubernetes cluster.
In this tutorial we will use “kind” (Kubernetes in Docker). Have fun!
#Install Kind curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.6.1/kind-$(uname)-amd64 chmod +x ./kind mv ./kind /some-dir-in-your-PATH/kind#Install Docker yum install docker -y systemctl start docker#Create Cluster kind create cluster#Delete Cluster kind delete cluster
Kubernetes is love, Kubernetes is life
Long story short: your container troubles are over. K8s is a fun and easy way to automate your processes. It’s an extraordinary project that, maybe above all, is completely free and open source! Oh, how easy life can be…
Sorry, the comment form is closed at this time.