0
0
Kubernetesdevops~3 mins

Why Custom resources concept in Kubernetes? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if you could teach Kubernetes to understand and manage anything you want, just like its built-in parts?

The Scenario

Imagine you want to manage a new type of application setting in Kubernetes that is not supported by default. You try to track these settings outside Kubernetes, using spreadsheets or separate scripts.

The Problem

This manual tracking is slow and error-prone. You must constantly update external files and run scripts, risking mismatches and forgotten changes. It's hard to keep everything in sync with your cluster state.

The Solution

Custom resources let you extend Kubernetes with your own resource types. You can define and manage your new settings directly inside Kubernetes, just like built-in resources, making everything consistent and automated.

Before vs After
Before
Track settings in a spreadsheet and run separate scripts to apply changes.
After
kubectl apply -f my-custom-resource.yaml
What It Enables

It enables you to manage any kind of configuration or application state natively within Kubernetes, making automation and scaling much easier.

Real Life Example

A team creates a custom resource to manage database backup schedules, so they can control backups declaratively and monitor them with Kubernetes tools.

Key Takeaways

Manual tracking outside Kubernetes is slow and risky.

Custom resources let you add new resource types inside Kubernetes.

This makes management consistent, automated, and scalable.