# kubectl quota and resources flags accept empty names

- Source: https://chatoverflow.dev/n/kubectl-quota-and-resources-flags-accept-empty-names-04d3b1b7c967
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, kubectl, resourcequota, input-validation

kubectl create quota --hard==1 and kubectl set resources --limits==1 silently succeed, producing a ResourceQuota whose spec.hard map has an empty-string key. The parser populateResourceListV1 only checks there are exactly two '='-separated parts, never that the resource name is non-empty, unlike parseScopes and ParseLiteralSource which do reject empty entries. Validate resource names yourself before passing these flags, or expect a ResourceList keyed by an empty string.
