Hey everyone!
Following my recent [spanish] talk in Oviedo (Spain), which video you can find in this email, I wanted write a brief email about the main topics discussed.
☝🏼 As I always say, a Senior Software Engineer and Tech Lead must master human skills but also keep up the pace on new technologies.
In today’s email, we cover:
A short introduction to Kubernetes
Explore the magic of Custom Resources
Share some lessons learned
And answer the burning question:
👉🏼 How do Custom Resources help us build better software? Grab your tea 🍵 and let’s get started!
☸️ What is Kubernetes?
At its core 👇🏼
Kubernetes is an open-source platform that automates the deployment, scaling, and management of containerized applications.
It handles the heavy lifting—think auto-scaling, load balancing, self-healing, and more—so you can focus on writing awesome code without worrying about the underlying infrastructure.
It’s not my purpose to give you a heavy introduction to Kubernetes but you see the value that can give you at the time of implementing your software and architecture.
🔧 What are Kubernetes Custom Resources?
👉🏼 Custom Resources (CRs) are like adding your own plug-ins to Kubernetes.
While Kubernetes comes with built-in resources (Pods, Services, Deployments, etc.), CRs let you define new resource types tailored to your application's needs.
Imagine you need to manage a special configuration or a custom workflow (say, DatadogConfig
for your monitoring setup). With CRs, you can tell Kubernetes:
Hey, I need a new resource of this kind.
And it’ll handle it just like any native resource.
☝🏼 This is important so, give me 1 minute to explain it to you exemplifying from a programming language.
1️⃣ In a programming language, you have some built-in types. For example, String, integer, boolean, or even Object (in Java). From there, to model your business, you can create your own types, like City or Person structures.
2️⃣ Kubernetes comes with standard resources as well (Pod, Deployment, ConfigMap, etc), as a programming language comes with built-in types, and with Custom Resources you can tell that there are new concepts specific to your business.
Once defined, Kubernetes automatically exposes a REST API to create, read, update, and manage these new resources, natively extending the platform.
It’s as if you’re extending Kubernetes with your own mini-API—pretty cool, right?
📚 Lessons Learned Along the Way
Working with Custom Resources has been a game-changer, but it hasn’t been without its bumps. Here are some lessons learned along the way.
🚫💾 Keep It Lean: Remember this: Kubernetes isn’t a database. It’s awesome for managing configurations and workflows but not meant to store huge amounts of transactional data.
🔔⚡Embrace Asynchronicity: One of the best parts is how Kubernetes can notify your app about changes in your Custom Resources. This makes it super easy to react to events asynchronously—like having a built-in message queue.
🔄 Version, Version, Version: Just like with your REST APIs, versioning your Custom Resources is crucial. It allows you to evolve your resource definitions over time without breaking existing deployments.
Now, let’s jump to the real question for us, Software Developers.
💡 How Do Custom Resources Help in Software Development?
👉🏼 Custom Resources empower us, developers, by letting us model our application's configuration directly inside Kubernetes.
Here’s how they make our lives easier:
🤝 Decoupling Made Simple: They help separate the business logic from the infrastructure. Instead of hardcoding configurations or coupling components tightly, you define them declaratively. This means different teams can work independently without stepping on each other’s toes.
🔥 Automation on Steroids: With CRs, you can automate complex deployment scenarios. Want to roll out a new feature without downtime? Define the process in your Custom Resource, and let Kubernetes handle the rest!
📈💥 Scalability & Resilience: By offloading responsibilities like configuration management and event handling to Kubernetes, your apps become more scalable and resilient. It’s like having a smart assistant that ensures everything runs smoothly, even when traffic spikes.
How does this sound to you? Let’s wrap up for today.
✨ Summary
Kubernetes isn’t just about running containers—it’s a dynamic platform that, when extended with Custom Resources, allows you to build software that’s decoupled, scalable, and super responsive.
My talk in Oviedo sparked some great conversations on this very topic, and I’m excited to share these ideas with you.
If you haven’t yet explored CRs, now’s the time to jump in and see how they can transform your development workflow. For sure it’s not for all use cases, starting from the point of having Kubernetes in your stack. I would encourage you to explore Kubernetes if it makes for your business (watch out for the money).
What are your thoughts or experiences with Kubernetes Custom Resources? Drop a comment or reply to this email—I’d love to hear from you!
We are more than ✨1003 subscribers✨, such a milestone! Thank you all for your trust.
You rock! 🖖🏼
𝘐𝘧 𝘺𝘰𝘶 𝘦𝘯𝘫𝘰𝘺𝘦𝘥 𝘵𝘩𝘪𝘴 𝘱𝘰𝘴𝘵, 𝘵𝘩𝘦𝘯 𝘤𝘭𝘪𝘤𝘬 𝘵𝘩𝘦 💜. 𝘐𝘵 𝘩𝘦𝘭𝘱𝘴!
𝘐𝘧 𝘺𝘰𝘶 𝘬𝘯𝘰𝘸 𝘴𝘰𝘮𝘦𝘰𝘯𝘦 𝘦𝘭𝘴𝘦 𝘸𝘪𝘭𝘭 𝘣𝘦𝘯𝘦𝘧𝘪𝘵 𝘧𝘳𝘰𝘮 𝘵𝘩𝘪𝘴, ♻️ 𝘴𝘩𝘢𝘳𝘦 𝘵𝘩𝘪𝘴 𝘱𝘰𝘴𝘵.
Share this post