Understanding Kubernetes: Developer’s Guide
--
Kubernetes is a cool word to have in your Architecture Document, and hot on your CV. On-Premise or on the Cloud, everyone wants to have the workloads in Kubernetes. While we follow the herd, it is important to understand what goes into it. What are the patterns and anti-patterns when we work with Kubernetes? This blog gives you all that you need, to understand and use Kubernetes.
- Why Kubernetes
- The core concepts
- Minikube
- Kubernetes Objects
- Patterns & Antipatterns
- Kubernetes in Cloud — EKS
- Kubectl
- MicroK8s
- Interview Questions
Why Kubernetes?
Why?$%^#
That was my first thought when I read about Kubernetes. Why do we need such complex systems? A simple java -jar is enough to run my microservice on the Linux server! I write good code. I handle all exceptions. I am sure nothing will fail. Even if it fails, I can write a simple bash script that takes care of restarting my service. My code can take care of horizontal scaling and failovers. I have a good firewall and logging framework. And all this requires just a few lines of additional code — packed into a simple Jar that I include in all my microservices. Why should I waste precious computing and time and resources on such crazy stuff? Frankly, I still feel the same.
A lot of systems really don’t need Kubernetes. But some systems do. For mission-critical enterprise-scale applications, where downtime can be costly, we need more than just an in-house library — to take care of the service orchestration. We tend to underestimate the level of hardening and resilience that we need for such applications. And it is not possible or worth the effort if we go out reinventing the wheel for every application in the world. We need a system that is tested and hardened by developers all over the globe. And that is Kubernetes.
Yes, Kubernetes gives a lot more than the above, and that may seem wasteful to some. But we can also look at it as an opportunity to improve and scale our services beyond what we need today. This requires a minor effort in learning something new — with great…