Skip to content

Commit 08fbe83

Browse files
authored
Merge pull request #42117 from sftim/20230720_tweak_working_with_objects
Tweak Objects In Kubernetes concept
2 parents 71cd6ca + 819d4c3 commit 08fbe83

File tree

1 file changed

+15
-7
lines changed
  • content/en/docs/concepts/overview/working-with-objects

1 file changed

+15
-7
lines changed

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ will constantly work to ensure that object exists. By creating an object, you're
3333
telling the Kubernetes system what you want your cluster's workload to look like; this is your
3434
cluster's *desired state*.
3535

36-
To work with Kubernetes objects--whether to create, modify, or delete them--you'll need to use the
36+
To work with Kubernetes objectswhether to create, modify, or delete themyou'll need to use the
3737
[Kubernetes API](/docs/concepts/overview/kubernetes-api/). When you use the `kubectl` command-line
3838
interface, for example, the CLI makes the necessary Kubernetes API calls for you. You can also use
3939
the Kubernetes API directly in your own programs using one of the
@@ -71,15 +71,18 @@ For more information on the object spec, status, and metadata, see the
7171
When you create an object in Kubernetes, you must provide the object spec that describes its
7272
desired state, as well as some basic information about the object (such as a name). When you use
7373
the Kubernetes API to create the object (either directly or via `kubectl`), that API request must
74-
include that information as JSON in the request body. **Most often, you provide the information to
75-
`kubectl` in a .yaml file.** `kubectl` converts the information to JSON when making the API
76-
request.
74+
include that information as JSON in the request body.
75+
Most often, you provide the information to `kubectl` in file known as a _manifest_.
76+
By convention, manifests are YAML (you could also use JSON format).
77+
Tools such as `kubectl` convert the information from a manifest into JSON or another supported
78+
serialization format when making the API request over HTTP.
7779

78-
Here's an example `.yaml` file that shows the required fields and object spec for a Kubernetes Deployment:
80+
Here's an example manifest that shows the required fields and object spec for a Kubernetes
81+
Deployment:
7982

8083
{{% code_sample file="application/deployment.yaml" %}}
8184

82-
One way to create a Deployment using a `.yaml` file like the one above is to use the
85+
One way to create a Deployment using a manifest file like the one above is to use the
8386
[`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands#apply) command
8487
in the `kubectl` command-line interface, passing the `.yaml` file as an argument. Here's an example:
8588

@@ -95,7 +98,8 @@ deployment.apps/nginx-deployment created
9598

9699
### Required fields
97100

98-
In the `.yaml` file for the Kubernetes object you want to create, you'll need to set values for the following fields:
101+
In the manifest (YAML or JSON file) for the Kubernetes object you want to create, you'll need to set values for
102+
the following fields:
99103

100104
* `apiVersion` - Which version of the Kubernetes API you're using to create this object
101105
* `kind` - What kind of object you want to create
@@ -159,6 +163,10 @@ If you're new to Kubernetes, read more about the following:
159163
* [Controllers](/docs/concepts/architecture/controller/) in Kubernetes.
160164
* [kubectl](/docs/reference/kubectl/) and [kubectl commands](/docs/reference/generated/kubectl/kubectl-commands).
161165

166+
[Kubernetes Object Management](/docs/concepts/overview/working-with-objects/object-management/)
167+
explains how to use `kubectl` to manage objects.
168+
You might need to [install kubectl](/docs/tasks/tools/#kubectl) if you don't already have it available.
169+
162170
To learn about the Kubernetes API in general, visit:
163171

164172
* [Kubernetes API overview](/docs/reference/using-api/)

0 commit comments

Comments
 (0)