Skip to content

Commit dd7bc23

Browse files
committed
updated
Signed-off-by: kirti763 <[email protected]>
1 parent a39a164 commit dd7bc23

File tree

1 file changed

+10
-8
lines changed
  • content/en/blog/_posts/2025-11-11-kubernetes-configuration-best-practices

1 file changed

+10
-8
lines changed

content/en/blog/_posts/2025-11-11-kubernetes-configuration-best-practices/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,24 @@ kubectl api-resources
2525
This simple step saves you from future compatibility issues.
2626

2727
### Store configuration in version control
28-
Never apply YAML files directly from your desktop. Always keep them in a version control system like Git, it's your safety net.
28+
Never apply manifest files directly from your desktop. Always keep them in a version control system like Git, it's your safety net.
2929
If something breaks, you can instantly roll back to a previous commit, compare changes or recreate your cluster setup without panic.
3030

3131
### Write configs in YAML not JSON
3232
Write your configuration files using YAML rather than JSON. Both work technically, but YAML is just easier for humans. It's cleaner to read and less noisy and widely used in the community.
3333

34-
> Note: YAML has some sneaky gotchas with booleans.
34+
YAML has some sneaky gotchas with boolean values:
3535
Use only `true` or `false`.
3636
Don't write `yes`, `no`, `on` or `off`.
3737
They might work in one version of YAML but break in another. To be safe, quote anything that looks like a Boolean (for example `"yes"`).
3838

3939
### Keep configuration simple and minimal
40-
Avoid setting default values that are already handled by Kubernetes. Minimal YAMLs are easier to debug, cleaner to review and less likely to break things later.
40+
Avoid setting default values that are already handled by Kubernetes. Minimal manifests are easier to debug, cleaner to review and less likely to break things later.
4141

4242
### Group related objects together
43-
If your Deployment, Service and ConfigMap all belong to one app, put them in a single YAML file. It's easier to track changes and apply them as a unit. See the [Guestbook all-in-one.yaml](https://github.com/kubernetes/examples/blob/master/web/guestbook/all-in-one/guestbook-all-in-one.yaml) file as an example of this syntax.
43+
If your Deployment, Service and ConfigMap all belong to one app, put them in a single manifest file.
44+
It's easier to track changes and apply them as a unit.
45+
See the [Guestbook all-in-one.yaml](https://github.com/kubernetes/examples/blob/master/web/guestbook/all-in-one/guestbook-all-in-one.yaml) file for an example of this syntax.
4446

4547
You can even apply entire directories with:
4648
```bash
@@ -49,14 +51,14 @@ kubectl apply -f configs/
4951
One command and boom everything in that folder gets deployed.
5052

5153
### Add helpful annotations
52-
YAML files are not just for machines, they are for humans too. Use annotations to describe why something exists or what it does. A quick one-liner can save hours when debugging later and also allows better collaboration.
54+
Manifest files are not just for machines, they are for humans too. Use annotations to describe why something exists or what it does. A quick one-liner can save hours when debugging later and also allows better collaboration.
5355

5456
The most helpful annotation to set is `kubernetes.io/description`. It's like using comment, except that it gets copied into the API so that everyone else can see it even after you deploy.
5557

5658
## Managing Workloads: Pods, Deployments, and Jobs
5759

58-
Most of us started our Kubernetes journey by creating Pods directly.
59-
While Pods are the building blocks of Kubernetes, using them directly is like driving without a seatbelt, it works until something crashes.
60+
A common early mistake in Kubernetes is creating Pods directly. Pods work, but they don't reschedule themselves if something goes wrong.
61+
6062
_Naked Pods_ (Pods not managed by a controller, such as [Deployment](/docs/concepts/workloads/controllers/deployment/) or a [StatefulSet](/docs/concepts/workloads/controllers/statefulset/)) are fine for testing, but in real setups, they are risky.
6163

6264
Why?
@@ -168,7 +170,7 @@ That’s a super underrated trick every Kubernetes engineer should know.
168170

169171
## Handy kubectl tips
170172

171-
These small tips make life much easier when you are working with multiple YAMLs or clusters.
173+
These small tips make life much easier when you are working with multiple manifest files or clusters.
172174

173175
### Apply entire directories
174176
Instead of applying one file at a time, apply the whole folder:

0 commit comments

Comments
 (0)