DEV Community

Cover image for Having fun with Kubernetes - Chapter 1
Martin Pham
Martin Pham

Posted on • Updated on

Having fun with Kubernetes - Chapter 1

Kubernetes (aka k8s – well, because there are 8 characters between K and S) was always on my Checklist for a long time. Since I wanted to learn more about DevOps to improve our delivery process at work.

But before throwing ourselves into Kubernetes (alright, let’s call it k8s from now on), there are something we need to understand. And the first basic thing is Container. WT* is a Container?

Remember thousand of years ago… When your project’s development is finished, you’d go to a Server hosting provider and ask for a new server, or just a space on their server. After paying your hosting, you’d upload your code, your database,… into it and voilà, your website is online!

Time was passing by… paying for a dedicated server is very high, plus the management, maintenance,… Or if you hosted your website together with others for saving money, but sometime your neighbour’s website crashes the entire server 😅. Well, a new option came: Virtual Private Server (aka VPS) – your dedicated server with lower cost, less management pain. Seems you can sleep well now, without worrying about your neighbour’s application!

Again, after hundred of years using VPS, you and your crew were facing many new problems with the VPS dream:

  • Virtual Machine (VM) contains full OS, it’s very heavy for backup, snapshot, …
  • Spin up a new VM could take minutes, it’s unacceptable for our era.
  • For every VM, beside resources (CPU, RAM, Disk,..) for your application, you also waste those resources for the OS, and they are not cheap when your applications require many VMs.
  • Wait, listen, also your development teams are complaining about the differences between their development environment vs production environment!

So, welcome to 21st century, with Container – A new way to create a virtual isolated environment for your application:

  • Container provides an isolated environment which runs your application, independent from the host OS.
  • Container stays on top of a Container Runtime, shares the resources, libraries,.. with the host OS. So you aren’t running an entire isolated OS on the host OS, but you’re running an isolated application on the host OS.
  • Spin up a new Container in milliseconds: Imagine if your server is under high-load, you can just put more 10 minions under your load balancer in just some milliseconds!
  • And it’s cool!

Container is for running your application, and there is Kubernetes – k8s for managing your Containers easily and lovely!

(To be continued)

Chapter 2 is here

Top comments (3)

__kaushiksarkar profile image
Kaushik Sarkar

Hi Martin,

It's a nice starting point in the world of containers.

martinpham profile image
Martin Pham

Glad you like it :) Kaushik

ripzery_85 profile image

Have fun on cyber noodle!