Skip to content

The resources.limits.memory unit is automatically converted. Why cannot the unit be displayed as configured? #1729

Open
@Black-max12138

Description

@Black-max12138

What happened?

When resources.limits.memory is set to 1237.3Mi, the actual pod is 1297403084800 m by running the kubectl command, which is difficult to understand.

What did you expect to happen?

Resources.limits.memory can be displayed based on the configured value and unit.

How can we reproduce it (as minimally and precisely as possible)?

Set resources.limits.memory to 1237.3Mi and run the kubectl command to check the value.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# paste output here

1.31

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.sig/cliCategorizes an issue or PR as relevant to SIG CLI.triage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions