Kubernetes and Cloud Native Associate (KCNA) Practice Questions

Kubernetes and Cloud Native Associate (KCNA) exam preparation

Kubernetes and Cloud Native Associate (KCNA) practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 90 minutes.

Kubernetes and Cloud Native Associate (KCNA) free question 6 / 10 · Domain 2: Container Orchestration

A kubectl command that creates a Deployment passes through stages inside the API server. Which statement matches the Kubernetes documentation?

  1. Authorization happens before authentication, deciding permissions before the user name is known
  2. Admission control runs after authorization, and can modify or reject a request
  3. The authentication stage also decides whether the requested operation is permitted
  4. An object that passes admission control is stored as it is, with no validation step
Show the answer and explanation

Answer: B

Why this is correct
The Controlling Access to the Kubernetes API page says that, once TLS is established, a request moves through three steps: authentication (step 1 in its diagram), authorization (step 2), and admission control (step 3). Authentication identifies the user, and a request that cannot be authenticated is rejected with HTTP status code 401. Authorization checks whether that user may perform the operation. Admission control modules are software modules that can modify or reject requests, and in addition to the attributes available to authorization modules, they can access the contents of the object that is being created or modified. After all admission controllers accept the request, it is validated against the API object's validation routines and written to the object store.

Why the other options are wrong
"Authorization happens before authentication, deciding permissions before the user name is known" … The page orders the steps as TLS, authentication, authorization, then admission control. Authentication establishes the user name that later steps, including authorization, use in their decisions.
"An object that passes admission control is stored as it is, with no validation step" … The page says that once a request passes all admission controllers, it is validated using the validation routines for the corresponding API object, and only then written to the object store.
"The authentication stage also decides whether the requested operation is permitted" … Authentication only establishes who the user is, and rejects requests that cannot be authenticated with HTTP status code 401. Whether the operation is allowed is decided in the authorization step.

Who are you, may you, is it acceptable
Authentication, then authorization, then admission control, then validation and storage. Only admission control looks at the object's contents and can change them.

Go to the Kubernetes and Cloud Native Associate (KCNA) practice app (10 free questions; purchase unlocks all questions)

See the full practice set