The connection fails if the folder ~/.kube/cache does not exist. For example, when set up a new client from scratch, we install kubectl and the plugin : the client has never been logged in yet, so the cache folder does not exist and the log in fails.