You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/contribute/style/style-guide.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,10 +46,6 @@ When you refer specifically to interacting with an API object, use [UpperCamelCa
46
46
47
47
When you are generally discussing an API object, use [sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
48
48
49
-
You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
50
-
51
-
Don't split an API object name into separate words. For example, use PodTemplateList, not Pod Template List.
52
-
53
49
The following examples focus on capitalization. For more information about formatting API object names, review the related guidance on [Code Style](#code-style-inline-code).
54
50
55
51
{{< table caption = "Do and Don't - Use Pascal case for API objects" >}}
@@ -187,6 +183,36 @@ Set the value of `image` to nginx:1.16. | Set the value of `image` to `nginx:1.1
187
183
Set the value of the `replicas` field to 2. | Set the value of the `replicas` field to `2`.
188
184
{{< /table >}}
189
185
186
+
## Referring to Kubernetes API resources
187
+
188
+
This section talks about how we reference API resources in the documentation.
189
+
190
+
### Clarification about "resource"
191
+
192
+
Kubernetes uses the word "resource" to refer to API resources, such as `pod`, `deployment`, and so on. We also use "resource" to talk about CPU and memory requests and limits. Always refer to API resources as "API resources" to avoid confusion with CPU and memory resources.
193
+
194
+
### When to use Kubernetes API terminologies
195
+
196
+
The different Kubernetes API terminologies are:
197
+
198
+
- Resource type: the name used in the API URL (such as `pods`, `namespaces`)
199
+
- Resource: a single instance of a resource type (such as `pod`, `secret`)
200
+
- Object: a resource that serves as a "record of intent". An object is a desired state for a specific part of your cluster, which the Kubernetes control plane tries to maintain.
201
+
202
+
Always use "resource" or "object" when referring to an API resource in docs. For example, use "a `Secret` object" over just "a `Secret`".
203
+
204
+
### API resource names
205
+
206
+
Always format API resource names using [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), also known as PascalCase, and code formatting.
207
+
208
+
For inline code in an HTML document, use the `<code>` tag. In a Markdown document, use the backtick (`` ` ``).
209
+
210
+
Don't split an API object name into separate words. For example, use `PodTemplateList`, not Pod Template List.
211
+
212
+
For more information about PascalCase and code formatting, please review the related guidance on [Use upper camel case for API objects](/docs/contribute/style/style-guide/#use-upper-camel-case-for-api-objects) and [Use code style for inline code, commands, and API objects](/docs/contribute/style/style-guide/#code-style-inline-code).
213
+
214
+
For more information about Kubernetes API terminologies, please review the related guidance on [Kubernetes API terminology](/docs/reference/using-api/api-concepts/#standard-api-terminology).
0 commit comments