Skip to content

Support for resize subresource in Kubernetes C# client #1641

@aliridahussein

Description

@aliridahussein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions