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
The flag `--subresource` is used with the kubectl get, patch, edit, and replace commands to
1456
+
fetch and update the subresources, `status` and `scale`, for all the API resources that
1457
+
support them. This flag is available starting from kubectl version v1.24. Previously, reading
1458
+
subresources (like `status`) via kubectl involved using `kubectl --raw`, and updating
1459
+
subresources using kubectl was not possible at all. Starting from v1.24, the `kubectl` tool
1460
+
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).
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.
1469
+
This page is part of the documentation for Kubernetes v{{< skew currentVersion >}}.
1470
+
If you are running a different version of Kubernetes, consult the documentation for that release.
1455
1471
1456
-
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:
1472
+
Here is an example of how to patch the `status` subresource for a CRD object using `kubectl`:
1457
1473
-->
1458
-
{{< note >}}
1459
-
`kubectl`工具目前不能用于编辑或修补 CRD 上的 `status` 子资源:请参阅
1460
-
[kubectl Subresource Support KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2590-kubectl-subresource)
0 commit comments