Skip to content

Commit 15240fb

Browse files
committed
feat(README): Add Join multiple kubeconfigs on Windows #276
1 parent 16b3453 commit 15240fb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,31 @@ Or using `slu`:
20062006
slu k8s config add -p kubeconfig-new.yml
20072007
```
20082008

2009+
### Join multiple kubeconfigs on Windows
2010+
2011+
Backup your kubeconfig first
2012+
2013+
```powershell
2014+
Copy-Item -Path $HOME\.kube\config -Destination "$HOME\.kube\config.$((Get-Date -Format 'yyyy-MM-dd_HH-mm-ss')).backup"
2015+
```
2016+
2017+
Add `kubeconfig-new.yml` to your kubeconfig
2018+
2019+
```powershell
2020+
$env:KUBECONFIG = "kubeconfig-new.yml;$HOME\.kube\config"
2021+
```
2022+
2023+
```powershell
2024+
kubectl config view --raw > $HOME\.kube\config_tmp
2025+
```
2026+
2027+
```powershell
2028+
Remove-Item $HOME\.kube\config
2029+
Move-Item $HOME\.kube\config_tmp $HOME\.kube\config
2030+
```
2031+
2032+
Source: https://dbafromthecold.com/2020/02/21/merge-kubectl-config-files-on-windows/
2033+
20092034
### RBAC
20102035

20112036
Show all api resources (with verbs)

0 commit comments

Comments
 (0)