-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Update kubectl subresource documentation #49824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing.
|
|
That looks nice. Thanks. |
|
LGTM label has been added. Git tree hash: 8f8d6c99068f25e488e6c48d67b5da1246ce9388
|
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
/sig cli |
sftim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, try to avoid unrelated whitespace changes as they can provoke merge conflicts.
We could merge this but I would tweak it; the CRD page mentions some details relevant to old (v1.23) Kubernetes that I don't think we need to keep.
So:
/hold
OK to unhold if we want to ship this and iterate.
/approve
I support the intent of this PR.
|
|
||
| * You can use the `--subresource` beta flag for kubectl commands like `get`, `patch`, | ||
| `edit` and `replace` to fetch and update subresources for all resources that | ||
| * You can use the `--subresource` flag for kubectl commands like `get`, `patch`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit)
| * You can use the `--subresource` flag for kubectl commands like `get`, `patch`, | |
| * You can use the `--subresource` argument for kubectl subcommands such as `get`, `patch`, |
| edit and replace to fetch and update `status` and `scale` subresources of the resources | ||
| (applicable for kubectl version v1.24 or more). This flag is used with all the API resources | ||
| edit, apply and replace to fetch and update `status` and `scale` subresources of the resources | ||
| (applicable for kubectl version v1.24 or newer). This flag is used with all the API resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (applicable for kubectl version v1.24 or newer). This flag is used with all the API resources | |
| you specify. You can specify a subresource for any of the Kubernetes API resources |
| (built-in and CRs) that have `status` or `scale` subresource. Deployment is one of the | ||
| examples which supports these subresources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (built-in and CRs) that have `status` or `scale` subresource. Deployment is one of the | |
| examples which supports these subresources. | |
| (built-in and CRs) that have either a `status` or `scale` subresource, if they have both. | |
| For example, a Deployment has a `status` subresource and a `scale` subresource, so you can use | |
| `kubectl` to get or modify just the `status` subresource of a Deployment. |
...nt/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
Outdated
Show resolved
Hide resolved
| storage version, which is `v1`. | ||
| 3. Remove `v1beta1` from the CustomResourceDefinition `status.storedVersions` field. | ||
|
|
||
| {{< note >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could simplify the contents of this note to:
Here is an example of how to patch the `status` subresource for a CRD object using `kubectl`:
```bash
kubectl patch customresourcedefinitions <CRD_Name> --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1"]}}'
```
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it's reasonable. Previously --subresource was new, so we needed explicit info when it's available. But since it's beta for all supported releases, we can just mention the example only.
| `edit` and `replace` to fetch and update subresources for all resources that | ||
| * You can use the `--subresource` flag for kubectl commands like `get`, `patch`, | ||
| `edit`, `apply` and `replace` to fetch and update subresources for all resources that | ||
| support them. Currently, only the `status` and `scale` subresources are supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| support them. Currently, only the `status` and `scale` subresources are supported. | |
| support them. In Kubernetes version {{< skew currentVersion >}}, only the `status` and `scale` subresources are supported. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Maciej Szulik <[email protected]>
123bc59 to
ab6b9ae
Compare
Will drop them, my editor by default removes all whitespaces from line endings.
Updated, so droping the hold /hold cancel |
|
Changes since LGTM in #49824 (comment) are trivial |
|
LGTM label has been added. Git tree hash: d49a4500ff4846d81294168b6e0684b56f4f1a92
|
Description
Updates kubectl subresource documentation
Issue
Ref: kubernetes/enhancements#2590
/assign @ardaguclu