18 Aug 2024
By Alex
Hello! Welcome to Cloud Native Mauritius’s first post, written by yours truly Alex :) In this post, I’m starting with something very simple, which everyone interested in the Cloud Native ecosystem must have asked themselves at one point. Additionally, this is simple enough that I hopefully won’t scare everyone away. So, without further ado, let’s have a look at Kubernetes!
Kubernetes, also known under the abbreviation K8S (pronounced Kates), is probably the most well known project under the Cloud Native Landscape. Released back in 2014, and assigned to the CNCF (Cloud Native Computing Foundation), which itself is a branch of the Linux Foundation, Kubernetes is ex-Google software which previously went by the name “Borg” - a Star Trek reference.
Trivia aside, Kubernetes is a framework, not in the sense of Nuxt, Laravel, or Django being frameworks though; rather as a framework for efficiently running and managing applications. It’s a full package for running clusters of computers, stringing several physical machines (or VMs) together in a synchronised way to run workloads in the form of containers.
Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerised applications. - CNCF
Another way of looking at Kubernetes, in the context of the 200-or-so other Cloud Native projects, is that it is the foundation for Cloud Native, offering a platform to plugin these other applications in order to achieve scalable, replicable, and highly-available systems.
Kubernetes is a very big package, comprised of many components which are all synchronised to provide these advantages. The entry-level components which make up the “foundations” of Kubernetes deployments are pods, deployments, services, and persistent volume (claims). You will undoubtedly come across these terms in your Kubernetes journey, and they deserve their own post in the future.
The interesting thing about Kubernetes though is that it is pretty much entirely just a RESTful API which you interact with through your usual Post/Get/Put/Delete HTTP requests which you can make from your command line, or which actually make up the backend of the kubectl CLI tool.
If you reached this far, it means you’re dedicated to learning more about Kubernetes, so let me sell you on its benefits a little bit!
Kubernetes, as mentioned above, lets you make your infrastructure easily scalable as it introduces horizontal scaling (increasing the number of servers) over vertical scaling (increasing performance of existing server(s)). Additionally, applications on Kubernetes are packaged as containers which can also be scaled! If I were running one instance of my website, and I had a sudden traffic surge, I could increase the number of instances running on the cluster to better manage the workload! Along the lines of scalability, it’s also possible to have an HPA - horizontal pod autoscaler - which automatically scales up your applications under load, or scales them down during a lull.
Additionally, as your applications are containerised, and your infrastructure can be summarised through Infrastructure As Code, your entire setup is easily replicable between different environments (dev, staging, test…). This also means no risk of vendor lock-in through proprietary technologies. If one day one Cloud Service Provider starts acting against your best interests, it is trivial to move your whole stack to another CSP, or even to bare-metal servers!
High availability is a real selling point of Kubernetes too. Instead of having a single monolithic server, which is a singular point of failure, your application is broken into microservices which can be distributed across your entire cluster. And if one of the nodes in the cluster crashes, or breaks down, the containers running on it can simply be reallocated to other nodes, and your service will continue uninterrupted!
The last selling point I want to touch on, albeit briefly, is the fine-grain control you have over your deployments, with the ability to do blue-green deployments, canary deployments, and other highly-specific techniques which you can customise to your business needs. And with that, you have the ability for Continuous Delivery with tools like ArgoCD, promoting GitOps.
And with that, I hope this small post has convinced you to take your first steps into Kubernetes and the intimidating Cloud Native Ecosystem! Please look forward to more posts in the near future about Kubernetes and the many tools you can use to push your infrastructure to the next level!