Question 15
Domain 1: Cluster Architecture, Installation & ConfigurationWhich kubectl option lets you use multiple kubeconfig files at the same time?
Correct answer: A
Explanation
kubectl reads the files named in the KUBECONFIG environment variable, and when it contains multiple paths separated by the platform path separator, it merges them into one configuration. That is why setting KUBECONFIG to a colon-separated list lets you use multiple kubeconfig files at the same time.
Why each option is right or wrong
A. Set the KUBECONFIG environment variable to a colon-separated list of kubeconfig paths
Kubernetes client configuration is defined by the kubeconfig loading rules in the kubectl/client-go config package: when the `KUBECONFIG` environment variable is set, kubectl loads every file listed in it and merges them into a single effective config. On Unix-like systems the list separator is `:` (on Windows it is `;`), so a colon-separated set of paths is the mechanism that enables simultaneous use of multiple kubeconfig files.
B. Use kubectl --kubeconfig with a comma-separated list of files
C. Run kubectl apply with --context to merge kubeconfig files
D. Place all kubeconfig files in ~/.kube/multi and kubectl will load them automatically