Solutions to the practice test - kubeconfig
Look for the kube config file under /root/.kube
Run the kubectl config view command and count the number of clusters
Run the command kubectl config view
and count the number of users
How many contexts are defined in the default kubeconfig file?
Run the command ‘kubectl config view’ and look for the user name.
What is the name of the cluster configured in the default kubeconfig file?
Run the command ‘kubectl config view –kubeconfig my-kube-config’
How many contexts are configured in the ‘my-kube-config’ file?
What user is configured in the ‘research’ context?
What is the name of the client-certificate file configured for the ‘aws-user’?
What is the current context set to in the ‘my-kube-config’ file?
Run the command kubectl config –kubeconfig=/root/my-kube-config use-context research
Replace the contents in the default kubeconfig file with the content from my-kube-config file.
The path to certificate is incorrect in the kubeconfig file. Fix it. All users certificates are stored at /etc/kubernetes/pki/users