vitals-1a8kcu5 has no resource policy yet. Create one:
sh
kubectl apply -n vitals-1a8kcu5 -f - <<EOF
apiVersion: v1
kind: LimitRange
metadata:
name: defaults
spec:
limits:
- type: Container
defaultRequest:
cpu: 100m
memory: 64Mi
default:
cpu: 500m
memory: 128Mi
max:
cpu: "1"
memory: 1Gi
EOFRun a Pod with no resources and read what it got:
sh
kubectl run plain --image=nginx:1.27 -n vitals-1a8kcu5
kubectl get pod plain -n vitals-1a8kcu5 -o jsonpath='{.spec.containers[0].resources}'Then try a Pod that wants two whole cores:
sh
kubectl run big --image=nginx:1.27 -n vitals-1a8kcu5 --limits=cpu=2