Fix file permissions for created configs
This commit is contained in:
parent
1ee6ba2cf9
commit
ae7b485bbf
1 changed files with 1 additions and 0 deletions
1
ktx
Executable file → Normal file
1
ktx
Executable file → Normal file
|
@ -7,6 +7,7 @@ _create_file_and_switch() {
|
|||
NAMESPACE=${2}
|
||||
FILENAME="$HOME/.kube/ktx/${CONTEXT}_${NAMESPACE}.conf"
|
||||
KUBECONFIG= kubectl config view --minify --flatten --context ${CONTEXT} > ${FILENAME}
|
||||
chmod o-rwx ${FILENAME}
|
||||
export KUBECONFIG=${FILENAME}
|
||||
kubectl config set-context --current --namespace=${NAMESPACE}
|
||||
ln -sf ${FILENAME} ${CUR_FILE}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue