Created
September 3, 2025 08:51
-
-
Save sc3p73r-it/f982cb00541433c3163dbdf827cf36e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: kubeadd new_kubeconfig_file | |
| cp ~/.kube/config ~/.kube/config.$(date +%F) | |
| KUBECONFIG=~/.kube/config:$1 kubectl config view --flatten > /tmp/config | |
| mv /tmp/config ~/.kube/config | |
| chmod 600 ~/.kube/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment