350-901 · Question #9
Refer to the exhibit. A kubeconfig file to manage access to clusters is provided. How many clusters are defined and which of them are accessed using username/ password authentication versus…
The correct answer is A. two clusters; scratch. The kubeconfig file defines two clusters, 'development' and 'scratch'. The 'development' cluster is accessed by the 'developer' user using client-certificate authentication, while the 'scratch' cluster is accessed by the 'experimenter' user whose authentication method is not…
Question
- cluster: certificate-authority: fake-ca-file server: https://1.2.3.4 name: development
- cluster: insecure-skip-tls-verify: true server: https://5.6.7.8 name: scratch contexts:
- context: cluster: development namespace: frontend user: developer name: dev-frontend
- context: cluster: development namespace: storage user: developer name: dev-storage
- context: cluster: scratch namespace: default user: experimenter name: exp-scratch current-context: "" preferences: {} users:
- name: developer user: client-certificate: fake-cert-file client-key: fake-key-file
- name: experimenter user: password: some-password username: exp
Options
- Atwo clusters; scratch
- Bthree clusters; scratch
- CThree clusters; development
- DTwo clusters; development
How the community answered
(32 responses)- A88% (28)
- B3% (1)
- C6% (2)
- D3% (1)
Why each option
The kubeconfig file defines two clusters, 'development' and 'scratch'. The 'development' cluster is accessed by the 'developer' user using client-certificate authentication, while the 'scratch' cluster is accessed by the 'experimenter' user whose authentication method is not defined as certificate-based within the provided user configuration.
The `clusters` array explicitly lists two entries: `development` and `scratch`. The `users` section defines the `developer` user with `client-certificate` and `client-key`, and this user is associated with the `development` cluster. The `experimenter` user, which accesses the `scratch` cluster, has no certificate details specified in the provided `users` block, implying it uses an alternative authentication method like username/password.
The YAML exhibit clearly defines only two distinct cluster objects under the `clusters` key, not three.
The YAML exhibit clearly defines only two distinct cluster objects, not three. Additionally, the `development` cluster is explicitly shown to be accessed via `client-certificate` authentication, not username/password.
While there are two clusters defined, the `development` cluster is accessed using certificate-based authentication as defined for the `developer` user.
Concept tested: Kubeconfig file structure and authentication
Source: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/
Topics
Community Discussion
No community discussion yet for this question.