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
Modify note content about kubectl, CRDs, and subresources (#34468)
* Modified the NOTE for Kubectl Subresource Support.
Improvement: Removed word tool.
Typo fix.
* Added task for patch the deployment using subresource flag.
* Updated the content.
* Updated the link for kubectl patch.
* Resolved nits.
* Improvement: updated the content.
* Removed new deployment and used existing deployment manifests.
Copy file name to clipboardExpand all lines: content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1081,13 +1081,18 @@ The following is an example procedure to upgrade from `v1beta1` to `v1`.
1081
1081
3. Remove `v1beta1` from the CustomResourceDefinition `status.storedVersions` field.
1082
1082
1083
1083
{{< note >}}
1084
-
The `kubectl` tool currently cannot be used to edit or patch the `status` subresource on a CRD: see the [Kubectl Subresource Support KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2590-kubectl-subresource) for more details.
1084
+
The flag `--subresource` is used with the kubectl get, patch, edit, and replace commands to
1085
+
fetch and update the subresources, `status` and `scale`, for all the API resources that
1086
+
support them. This flag is available starting from kubectl version v1.24. Previously, reading
1087
+
subresources (like `status`) via kubectl involved using `kubectl --raw`, and updating
1088
+
subresources using kubectl was not possible at all. Starting from v1.24, the `kubectl` tool
1089
+
can be used to edit or patch the `status` subresource on a CRD object. See [How to patch a Deployment using the subresource flag](/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/#scale-kubectl-patch).
1085
1090
1086
-
The easier way to patch the status subresource from the CLI is directly interacting with the API server using the `curl` tool, in this example:
1091
+
This page is part of the documentation for Kubernetes v{{< skew currentVersion >}}.
1092
+
If you are running a different version of Kubernetes, consult the documentation for that release.
1093
+
1094
+
Here is an example of how to patch the `status` subresource for a CRD object using `kubectl`:
0 commit comments