chmod 600 the kubeconfig

This commit is contained in:
Max Erenberg 2022-01-02 18:49:11 -05:00
parent 5f93b0e912
commit 7ec17b2b4d
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ def activate():
os.rename(kubeconfig, kubeconfig_bak)
with open(kubeconfig, 'w') as fo:
fo.write(result['kubeconfig'])
os.chmod(kubeconfig, 0o600)
except Exception:
click.echo(traceback.format_exc())
click.echo("We weren't able to write the kubeconfig file, so here it is.")