Repository: kubernetes
Issue: LimitRange and ResourceQuota Accept Values Without Units, Leading to Pod Scheduling and Runtime Failures
Labels: kind/bug,needs-sig,needs-triage

### What happened?

When creating a LimitRange or ResourceQuota without specifying units for memory and storage (e.g., "2" instead of "2Gi"), Kubernetes accepts the resource creation. However, pods fail to be scheduled, resulting in the following error:
`Error creating: pods "...": [maximum memory usage per Pod is 2, but limit is 1Gi, maximum memory usage per Container is 2, but limit is 1Gi]`

Upon adjusting pod resource requests and limits to omit units (e.g., memory: 1), pods schedule but remain stuck in the ContainerCreating phase with containerd errors:
`Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: OCI runtime create failed...`




### What did you expect to happen?

1. Kubernetes should reject LimitRange or ResourceQuota configurations without specified units for memory and storage.
2. Alternatively, Kubernetes should normalize the values to a default unit to ensure compatibility.

### How can we reproduce it (as minimally and precisely as possible)?

1. Create a LimitRange without units for memory:
yaml
`apiVersion: v1
kind: LimitRange
metadata:
  name: example-limitrange
  namespace: test-namespace
spec:
  limits:
  - type: Pod
    max:
      memory: "2"
    min:
      memory: "500m"
  - type: Container
    max:
      memory: "2"
    min:
      memory: "250m"
`

2. Create a ResourceQuota without units:
`
apiVersion: v1
kind: ResourceQuota
metadata:
  name: example-resourcequota
  namespace: test-namespace
spec:
  hard:
    limits.memory: "4"
    requests.memory: "4"
`
4. Deploy a pod with the following resource configuration:
`resources:
  requests:
    cpu: 500m
    memory: 512Mi
  limits:
    cpu: 500m
    memory: 1024Mi
`
5.Observe pod creation failure with FailedCreate event.
6.Update the pod memory to omit units:

`resources:
  requests:
    cpu: 500m
    memory: 1
  limits:
    cpu: 500m
    memory: 1
`
7. Observe pod stuck in ContainerCreating state with containerd errors.

### Anything else we need to know?

This issue occurs consistently across multiple clusters. ( EKs , k3s ...)
Errors in the ContainerCreating phase point to systemd and containerd issues when using unnormalized values

### Kubernetes version

<details>

```console
$ kubectl version
# Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.6-eks-7f9249a
```

</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# 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
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>