Question 2
Domain 3: Application Environment, Configuration, and SecurityWhich kubectl approach creates a Pod in namespace "one" with resource requests cpu=0.5, memory=1Gi and limits cpu=1, memory=2Gi?
Correct answer: A
Explanation
A Pod’s resource settings are defined in the manifest under `containers.resources.requests` and `containers.resources.limits`, so the manifest must specify `cpu: "500m"` for 0.5 CPU, `memory: "1Gi"`, `cpu: "1"`, and `memory: "2Gi"`. Setting the Pod in namespace `one` places it in the required namespace.
Why each option is right or wrong
A. Create a Pod manifest in namespace one with containers.resources.requests.cpu: "500m", memory: "1Gi" and containers.resources.limits.cpu: "1", memory: "2Gi"
Kubernetes resource quantities are expressed in the Pod spec, not as a runtime flag on `kubectl create pod`; the manifest must place the Pod in `metadata.namespace: one` and define each container’s `resources.requests` and `resources.limits` fields. Per the Kubernetes quantity syntax, `0.5` CPU is written as `500m`, while `1Gi` and `2Gi` are valid binary memory quantities, so the manifest must set requests to `cpu: "500m"`, `memory: "1Gi"` and limits to `cpu: "1"`, `memory: "2Gi"`.
B. Create a Pod manifest in namespace one with containers.resources.requests.cpu: "1", memory: "2Gi" and containers.resources.limits.cpu: "500m", memory: "1Gi"
C. Create a Pod manifest in namespace one with spec.resources.requests.cpu: "0.5", memory: "1Gi" and spec.resources.limits.cpu: "1", memory: "2Gi"
D. Create a Deployment in namespace one with containers.resources.requests.cpu: "500m", memory: "1Gi" and containers.resources.limits.cpu: "1", memory: "2Gi"