Skip to content

Commit 19c883d

Browse files
author
Tim Bannister
authored
Admit that some objects don't have a spec (#18050)
Whilst most objects have a spec, it will confuse readers who come to this page from a page about an object that doesn't (eg Secret, Namespace, Role).
1 parent 72129e2 commit 19c883d

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,27 @@ To work with Kubernetes objects--whether to create, modify, or delete them--you'
2626

2727
### Object Spec and Status
2828

29-
Every Kubernetes object includes two nested object fields that govern the object's configuration: the object *spec* and the object *status*. The *spec*, which you must provide, describes your desired state for the object--the characteristics that you want the object to have. The *status* describes the *actual state* of the object, and is supplied and updated by the Kubernetes system. At any given time, the Kubernetes Control Plane actively manages an object's actual state to match the desired state you supplied.
30-
31-
32-
For example, a Kubernetes Deployment is an object that can represent an application running on your cluster. When you create the Deployment, you might set the Deployment spec to specify that you want three replicas of the application to be running. The Kubernetes system reads the Deployment spec and starts three instances of your desired application--updating the status to match your spec. If any of those instances should fail (a status change), the Kubernetes system responds to the difference between spec and status by making a correction--in this case, starting a replacement instance.
29+
Almost every Kubernetes object includes two nested object fields that govern
30+
the object's configuration: the object *`spec`* and the object *`status`*.
31+
For objects that have a `spec`, you have to set this when you create the object,
32+
providing a description of the characteristics you want the resource to have:
33+
its _desired state_.
34+
35+
The `status` describes the _current state_ of the object, supplied and updated
36+
by the Kubernetes and its components. The Kubernetes
37+
{{< glossary_tooltip text="control plane" term_id="control-plane" >}} continually
38+
and actively manages every object's actual state to match the desired state you
39+
supplied.
40+
41+
For example: in Kubernetes, a Deployment is an object that can represent an
42+
application running on your cluster. When you create the Deployment, you
43+
might set the Deployment `spec` to specify that you want three replicas of
44+
the application to be running. The Kubernetes system reads the Deployment
45+
spec and starts three instances of your desired application--updating
46+
the status to match your spec. If any of those instances should fail
47+
(a status change), the Kubernetes system responds to the difference
48+
between spec and status by making a correction--in this case, starting
49+
a replacement instance.
3350

3451
For more information on the object spec, status, and metadata, see the [Kubernetes API Conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
3552

0 commit comments

Comments
 (0)