A quick disclaimer before we get started – I’m not a developer. In fact, until about four months ago I’d never even heard of Kubernetes, or Docker, or containers… But that’s exactly why I’ve written this guide. For people, like me, who are absolute beginners when it comes to Kubernetes or for developers who’d like their company to adopt Kubernetes but need to explain the value to decision-makers in non-technical roles.
This post will cover the following, select a topic to jump straight to that section:
- A definition of Kubernetes
- Some background behind why Kubernetes was developed
- An introduction to Kubernetes architecture and how it works (without all the demos, commands and huge chunks of code)
- Some key benefits of Kubernetes
- Dispelling some common misconceptions about Kubernetes
Rather view a presentation than read a blog post? Visit Bytemark’s SlideShare profile to view this guide as a slideshow.
Why was Kubernetes developed?
To understand why Kubernetes is needed, we first need to understand what containerised workloads are and the problems that arise when using them.
In the past, the majority of applications were monolithic. This means that they were built, run and stored in a way that all of the components were interconnected and interdependent.
But, in recent years, containerisation technology has emerged. Using this technology, large monolithic applications can be transitioned into multiple microservices. Each microservice controls one feature of the application and is stored in its own container.
The idea of containerised workloads is inspired by the shipping industry, where the introduction of standardised shipping containers and handling equipment made transportation more efficient. And there are many benefits to building applications in this way too.
For a start, it reduces dependencies within applications. So, an online banking app, for example, would be able to deploy changes to the saving accounts section without having to redeploy the current accounts section as well. Containers are also fast and very lean, you can store thousands of containers on a single server! This is an efficient use of resources and can save on hosting costs.
But, having thousands of individual containers also presents a problem. How do you manage, rollout, rollback, maintain and repair them all? The solution – Kubernetes.
So, in summary, Kubernetes was developed so that people could get the full benefits of containerisation technology, without having to spend all of their time managing the containers.
There is a lot of jargon associated with Kubernetes and the exact mechanics of how everything works can vary depending on the specifics of the setup being used. So I’m not going to cover that in this guide (though we do have a full Kubernetes Glossary if you’re interested). For now, we will just introduce the architecture behind how Kubernetes works.
Kubernetes has a master-slave architecture. There are multiple ‘worker nodes’ (slave) where containers are deployed and a ‘master node’ (master) which controls the deployment.
You can use a User Interface or Command Line Interface to input information to the master node (via an API). The master node then instructs the worker nodes to carry out actions that will drive the application from its current state towards the desired state, according to the information inputted.
Benefits of Kubernetes
Here are 5 key benefits of Kubernetes for developers and businesses:
Kubernetes can auto-restore from errors by rolling back to the last working version of the software. This allows development teams to ship updates quickly without the risk of breaking anything. So, new features and services can get to market quicker.
- High Availability
If there is a server failure, containers can be recreated on a working node to avoid downtime. This means your business can keep running as normal whilst the failure is resolved.
- Simplifies Maintenance
If a server needs to be rebooted, containers can be moved to another node whilst maintenance is carried out. This means services don’t have to go offline to be maintained.
- Automatic Scaling
Kubernetes uses information from user requests and CPU usage to increase or decrease the number of nodes running to match demand. So, you are always ready for a sudden spike in website traffic.
Kubernetes automatically spins up any new containers on under-utilized nodes. This can save money and helps you to get the most out of your IT resources.
Misconceptions about Kubernetes
Kubernetes is a great tool, and there are plenty of benefits to working with it. But it can’t do everything, people sometimes have misconceptions about the functions Kubernetes can perform. It is worth understanding where Kubernetes cannot help you before adopting it.
Kubernetes does not…
- Provide machine configuration
- Dictate logging, monitoring or alerting solutions
- Build your application for you
- Provide a specific configuration language or system for you,
but can store configuration files and variables for containers
- Provide middleware, data-processing frameworks, databases, caches etc. (Although Kubernetes can run all of these components).
That concludes this introductory guide to what Kubernetes is, how it works and the key benefits! Are you using Kubernetes yet? If not, and you’d be interested in beta testing a new Kubernetes service as we develop it, join our Kubernetes waitlist.
All of the information included in this post is also available in the slides below: