kubefwd
kubefwd copied to clipboard
kubelogin can't use auth token after it gets refreshed by kubefwd
Hi, I love kubefwd but when it runs long enough to refresh the auth token with kubelogin, the new token is created under root. So the next time I'm using kubectl it complains about the following:
Error: unable to read from token cache: /Users/glebteterin/.kube/cache/kubelogin/AzurePublicCloud-6dae42f8-4368-4678-94ff-3960e28e3630-80faf920-1908-4b52-b5ef-a8e7bedfc67a-07022bea-b53d-4f90-88f7-95421ccfafc9.json, err: failed to open file (/Users/glebteterin/.kube/cache/kubelogin/AzurePublicCloud-6dae42f8-4368-4678-94ff-3960e28e3630-80faf920-1908-4b52-b5ef-a8e7bedfc67a-07022bea-b53d-4f90-88f7-95421ccfafc9.json) while loading token: open /Users/glebteterin/.kube/cache/kubelogin/AzurePublicCloud-6dae42f8-4368-4678-94ff-3960e28e3630-80faf920-1908-4b52-b5ef-a8e7bedfc67a-07022bea-b53d-4f90-88f7-95421ccfafc9.json: permission denied
So I have to delete the token manually and login into the cluster again. I wonder if there's a solution?