nerdexam
Broadcom-VMware

5V0-23.20 · Question #29

Which kubectl command should be used to change the active vSphere namespace to namespace-01?

The correct answer is A. kubectl config use-context namespace-01. A context element in a kubeconfig file is used to group access parameters under a convenient name. Each context has three parameters: cluster, namespace, and user. By default, the kubectl command- line tool uses parameters from the current context to communicate with the…

Operating and Administering vSphere with Tanzu

Question

Which kubectl command should be used to change the active vSphere namespace to namespace-01?

Options

  • Akubectl config use-context namespace-01
  • Bkubectl describe ns namespace-01
  • Ckubectl get ns namespace-01
  • Dkubectl config change-context namespace-01

How the community answered

(32 responses)
  • A
    72% (23)
  • B
    16% (5)
  • C
    9% (3)
  • D
    3% (1)

Explanation

A context element in a kubeconfig file is used to group access parameters under a convenient name. Each context has three parameters: cluster, namespace, and user. By default, the kubectl command- line tool uses parameters from the current context to communicate with the cluster. To choose the current context: kubectl config use-context ctx001

Topics

#kubectl config#namespace context#use-context#kubeconfig

Community Discussion

No community discussion yet for this question.

Full 5V0-23.20 Practice