Question 1
At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: The target namespace ledger is missing, and the team needs an owner label finance before workload creation. Work only within the stated target and verify before declaring success. Which command or initial safe diagnostic step best addresses the stated lab task?
Explanation
Correct Answer
Run kubectl create namespace ledger and then kubectl label namespace ledger owner=finance --overwrite. This is the appropriate command-line action or first safe diagnostic. The technical reason is: A Namespace supplies a scope for namespaced resources while its metadata labels support policy and inventory selectors. Validate the result with: Run kubectl get namespace ledger --show-labels and confirm the namespace and owner label exist. Execute changes only in an authorized disposable lab or after normal production change controls.
Incorrect Answers
This alternative is a response to another technical cause: The snapshot-status tool inspects backup metadata without modifying the running etcd member or performing a restore. The reported case instead depends on: A Namespace supplies a scope for namespaced resources while its metadata labels support policy and inventory selectors. The action that directly addresses it is “Run kubectl create namespace ledger and then kubectl label namespace ledger owner=finance --overwrite”.
The proposed action belongs to the mechanism: A trailing minus removes the matching taint; adding a new toleration on every Pod would leave unnecessary cluster constraints. Here the stated fault follows a different mechanism: A Namespace supplies a scope for namespaced resources while its metadata labels support policy and inventory selectors. The corrective choice is “Run kubectl create namespace ledger and then kubectl label namespace ledger owner=finance --overwrite”.
The offered action targets: A ResourceQuota caps combined admitted requests in a namespace; per-Pod limits alone do not enforce a namespace-wide budget. The case facts point instead to: A Namespace supplies a scope for namespaced resources while its metadata labels support policy and inventory selectors. Implement “Run kubectl create namespace ledger and then kubectl label namespace ledger owner=finance --overwrite” to address that specific condition.