Bird
0
0

You want to configure kubectl to use a specific kubeconfig file located at /home/user/custom-config. Which command correctly sets this for the current shell session?

hard📝 Workflow Q8 of 15
Kubernetes - Fundamentals
You want to configure kubectl to use a specific kubeconfig file located at /home/user/custom-config. Which command correctly sets this for the current shell session?
Akubectl config use /home/user/custom-config
Bkubectl set config /home/user/custom-config
Cexport KUBECONFIG=/home/user/custom-config
Dset KUBECONFIG=/home/user/custom-config
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment variable usage

    KUBECONFIG environment variable tells kubectl which config file to use.
  2. Step 2: Identify correct syntax

    On Linux shells, export KUBECONFIG=path sets this for the session. Other commands are invalid or incorrect syntax.
  3. Final Answer:

    export KUBECONFIG=/home/user/custom-config -> Option C
  4. Quick Check:

    Set KUBECONFIG env var with export [OK]
Quick Trick: Use export KUBECONFIG=path to switch config [OK]
Common Mistakes:
  • Using kubectl commands to set config file path
  • Using Windows set syntax on Linux
  • Not exporting environment variable

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes