Skip to content

Commit 5b9bb69

Browse files
authored
Merge pull request #53438 from lmktfy/20251124_k8s_config_good_practice
Publish blog article "Kubernetes Configuration Good Practices"
2 parents 99fd007 + 929d279 commit 5b9bb69

File tree

7 files changed

+12
-165
lines changed

7 files changed

+12
-165
lines changed

content/en/blog/_posts/2023-03-30-kubescape-validating-admission-policy-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ would otherwise allow API requests to sneak past the validation rule by using th
115115
version. {{< /note >}}
116116

117117
The `validations` include the CEL rules for the objects. There are three different expressions,
118-
catering for the fact that a Pod `spec` can be at the root of the object (a [naked
119-
pod](/docs/concepts/configuration/overview/#naked-pods-vs-replicasets-deployments-and-jobs)),
118+
catering for the fact that a Pod `spec` can be at the root of the object (a _naked
119+
pod_,
120120
under `template` (a workload controller or a Job), or under `jobTemplate` (a CronJob).
121121

122122
In the event that any `spec` does not have `readOnlyRootFilesystem` set to true, the object will not

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
22
layout: blog
33
title: "Kubernetes Configuration Good Practices"
4-
date: 2025-11-11
5-
slug: kubernetes-configuration-good-practices
4+
date: 2025-11-25T00:00:00+00:00
5+
slug: configuration-good-practices
66
evergreen: true
77
author: Kirti Goyal
8-
draft: true
98
---
109

1110
Configuration is one of those things in Kubernetes that seems small until it's not. Configuration is at the heart of every Kubernetes workload.
@@ -14,7 +13,9 @@ A missing quote, a wrong API version or a misplaced YAML indent can ruin your en
1413
This blog brings together tried-and-tested configuration best practices. The small habits that make your Kubernetes setup clean, consistent and easier to manage.
1514
Whether you are just starting out or already deploying apps daily, these are the little things that keep your cluster stable and your future self sane.
1615

17-
## General Configuration Practices
16+
_This blog is inspired by the original *Configuration Best Practices* page, which has evolved through contributions from many members of the Kubernetes community._
17+
18+
## General configuration practices
1819

1920
### Use the latest stable API version
2021
Kubernetes evolves fast. Older APIs eventually get deprecated and stop working. So, whenever you are defining resources, make sure you are using the latest stable API version.

content/en/docs/concepts/configuration/overview.md

Lines changed: 0 additions & 154 deletions
This file was deleted.

content/en/docs/concepts/overview/working-with-objects/_index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,8 @@ satisfy the StatefulSet specification.
124124
Different kinds of objects can also have different `.status`; again, the API reference pages
125125
detail the structure of that `.status` field, and its content for each different type of object.
126126

127-
{{< note >}}
128-
See [Configuration Best Practices](/docs/concepts/configuration/overview/) for additional
127+
See [Kubernetes Configuration Best Practices](/blog/2025/11/25/configuration-good-practices/) for additional
129128
information on writing YAML configuration files.
130-
{{< /note >}}
131129

132130
## Server side field validation
133131

content/en/docs/reference/kubectl/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ where `command`, `TYPE`, `NAME`, and `flags` are:
6969

7070
* To specify resources with one or more files: `-f file1 -f file2 -f file<#>`
7171

72-
* [Use YAML rather than JSON](/docs/concepts/configuration/overview/#general-configuration-tips)
72+
* Use YAML rather than JSON
7373
since YAML tends to be more user-friendly, especially for configuration files.<br/>
7474
Example: `kubectl get -f ./pod.yaml`
7575

content/en/docs/reference/kubectl/conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ reconciled by a controller to a different value.
3939

4040
For `kubectl run` to satisfy infrastructure as code:
4141

42-
* Tag the image with a version-specific tag and don't move that tag to a new version. For example, use `:v1234`, `v1.2.3`, `r03062016-1-4`, rather than `:latest` (For more information, see [Best Practices for Configuration](/docs/concepts/configuration/overview/#container-images)).
42+
* Tag the image with a version-specific tag and don't move that tag to a new version. For example, use `:v1234`, `v1.2.3`, `r03062016-1-4`, rather than `:latest` (For more information, see [Kubernetes Configuration Good Practices](/blog/2025/11/25/configuration-good-practices/)).
4343
* Check in the script for an image that is heavily parameterized.
4444
* Switch to configuration files checked into source control for features that are needed, but not expressible via `kubectl run` flags.
4545

static/_redirects.base

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@
477477
/docs/tasks/administer-cluster/namespaces-walkthrough/ /docs/tutorials/cluster-management/namespaces-walkthrough/ 301
478478
/uk/docs/tasks/administer-cluster/namespaces-walkthrough/ /uk/docs/tutorials/cluster-management/namespaces-walkthrough/ 301
479479

480+
/docs/concepts/configuration/overview/ /blog/2025/11/25/configuration-good-practices/ 301
481+
480482
/blog/2025/09/23/introducing-headlamp-plugin-for-karpenter/ /blog/2025/10/06/introducing-headlamp-plugin-for-karpenter/ 301
481483

482484
/kubertenes /blog/2024/06/06/10-years-of-kubernetes/ 302

0 commit comments

Comments
 (0)