Support for resize subresource in Kubernetes C# client #1660
Replies: 4 comments
-
I think we just need to regenerate the client for 1.33 and we should pick this up (unless somehow it is missing from the api specification) |
Beta Was this translation helpful? Give feedback.
-
let me check |
Beta Was this translation helpful? Give feedback.
-
Hi all, I confirmed that the v1.33+ OpenAPI spec already defines the resize sub‑resource in api__v1_openapi.json: "/api/v1/namespaces/{namespace}/pods/{name}/resize": { This means no changes to the spec are needed, once the C# client is regenerated against this spec, it will automatically include a PatchNamespacedPodResizeAsync (or the PatchNamespacedPodAsync(..., subresource: "resize") overload). Do you have an estimated timeline for when the client will be regenerated and a new release published with this method? Thanks! |
Beta Was this translation helpful? Give feedback.
-
just confirmed, those api are already generated |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request
Please add support for the
resize
subresource in the Kubernetes C# client to enable in-place Pod resource updates (CPU/memory) without requiring a restart.Background
Kubernetes v1.33 introduced the
resize
subresource (beta) to allow in-place vertical scaling of Pods. This is accessible via:bash
kubectl edit pod --subresource=resize
However, the C# client currently does not expose this subresource, making it difficult to automate in-place scaling from .NET applications.
Use Case
We want to programmatically resize Pods without restarting them, using the C# client. This is especially useful for performance-sensitive workloads where downtime is not acceptable.
References
Kubernetes enhancement: kubernetes/enhancements#1287
API reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#pod-v1-core
Suggested Implementation
Expose a method like:
await client.PatchNamespacedPodResizeAsync(...);
Or allow specifying subresources in existing patch methods.
Beta Was this translation helpful? Give feedback.
All reactions