Skip to content

[FG:InPlacePodVerticalScaling] kubectl subcommand to resize pod resources #128278

@AnishShah

Description

@AnishShah

What would you like to be added?

In #128266, we are introducing a new /resize subresource to request pod resource resizing. It would be good add support for this in kubectl.

Few options:

  1. A new resize subcommand:
kubectl resize pods <pod-name> -c <container> --cpu <cpu> --memory <memory>
  1. support for resize subresource in existing commands like kubectl patch and kubectl edit:
kubectl patch pod pause \
     -p '{"spec":{"containers":[{"name":"pause", "resources": {"requests": {"cpu": "200m"}}}]}}' \
    --subresource=resize
kubectl edit pod pause --subresource=resize

Why is this needed?

This will help us manually test this feature as well as making it user friendly to use the new subresource.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.sig/cliCategorizes an issue or PR as relevant to SIG CLI.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Closed

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions