Add docs for kubectl subresource support

This commit is contained in:
Nikhita Raghunath
2022-04-04 13:57:25 +05:30
parent b3b7a184e0
commit 73563a3d7a
2 changed files with 16 additions and 0 deletions
@@ -19,6 +19,16 @@ For a stable output in a script:
* Fully-qualify the version. For example, `jobs.v1.batch/myjob`. This will ensure that kubectl does not use its default version that can change over time.
* Don't rely on context, preferences, or other implicit states.
## Subresources
* You can use the `--subresource` alpha flag for kubectl commands like `get`, `patch`,
`edit` and `replace` to fetch and update subresources for all resources that
support them. Currently, only the `status` and `scale` subresources are supported.
* The API contract against a subresource is identical to a full resource. While updating the
`status` subresource to a new value, keep in mind that the subresource could be potentially
reconciled by a controller to a different value.
## Best Practices
### `kubectl run`