I don’t understand why the task fails when the kubeconfig file and other parts are seen to be properly configured.
I am facing the exact same issue where the check is failing on setting the credentials for drogo user. Theoretically, if the user is not added to the config file properly, then the kube-config check should fail as well which is not the case and clear in the image shared by Tom. Response from the kodekloud team will be highly appreciated!
I think the mistake I made was over-writing the existing csr. It works fine for me now.
Not sure what it means, “over-writing the existing csr”. I would really appreciate if you can explain the steps you performed to resolve it.
All I am doing is running the following command to add drogo user in the config file:
k config set-credentials drogo --kubeconfig=/root/.kube/config --client-certificate=/root/drogo.crt --client-key=/root/drogo.key
Please suggest if any other step needs to be added.
A quick update. For whatever reason, the error is gone and the addition of user and context in config is working fine now!