-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
148 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
List, switch, add, delete and more interactive operations to manage kubeconfig. | ||
It also supports kubeconfig management from cloud. | ||
|
||
## Quick start | ||
|
||
### Install | ||
|
||
Using [Krew](https://krew.sigs.k8s.io/): | ||
|
||
```bash | ||
kubectl krew install kc | ||
``` | ||
|
||
Using Homebrew: | ||
|
||
```bash | ||
brew install kubecm | ||
``` | ||
|
||
Source binary: | ||
|
||
[Download the binary](https://github.com/sunny0826/kubecm/releases) | ||
|
||
### Add kubeconfig | ||
|
||
```bash | ||
# Merge test.yaml with $HOME/.kube/config | ||
kubecm add -f test.yaml | ||
# Add kubeconfig from stdin | ||
cat /etc/kubernetes/admin.conf | kubecm add -f - | ||
``` | ||
|
||
### List kubeconfig | ||
|
||
```bash | ||
# List all the contexts in your KubeConfig file | ||
kubecm list | ||
``` | ||
|
||
### Switch kubeconfig | ||
|
||
```bash | ||
# Switch Kube Context interactively | ||
kubecm switch | ||
# Quick switch Kube Context | ||
kubecm switch dev | ||
``` | ||
|
||
### Switch namespace | ||
|
||
```bash | ||
# Switch Namespace interactively | ||
kubecm namespace | ||
# or | ||
kubecm ns | ||
# change to namespace of kube-system | ||
kubecm ns kube-system | ||
``` | ||
![ns](../../static/ns.gif) | ||
|
||
### Interactive operation | ||
|
||
<script id="asciicast-389595" src="https://asciinema.org/a/389595.js" async></script> | ||
|
||
more commands, please see [CLI References](https://kubecm.cloud/en-us/cli/kubecm_add) |
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
List, switch, add, delete and more interactive operations to manage kubeconfig. | ||
It also supports kubeconfig management from cloud. | ||
|
||
## 快速开始 | ||
|
||
### 安装 | ||
|
||
使用 [Krew](https://krew.sigs.k8s.io/): | ||
|
||
```bash | ||
kubectl krew install kc | ||
``` | ||
|
||
使用 Homebrew: | ||
|
||
```bash | ||
brew install kubecm | ||
``` | ||
|
||
Source binary: | ||
|
||
[下载可执行文件](https://github.com/sunny0826/kubecm/releases) | ||
|
||
### 添加 kubeconfig | ||
|
||
```bash | ||
# Merge test.yaml with $HOME/.kube/config | ||
kubecm add -f test.yaml | ||
# Add kubeconfig from stdin | ||
cat /etc/kubernetes/admin.conf | kubecm add -f - | ||
``` | ||
|
||
### 列举 kubeconfig | ||
|
||
```bash | ||
# List all the contexts in your KubeConfig file | ||
kubecm list | ||
``` | ||
|
||
### 切换 kubeconfig | ||
|
||
```bash | ||
# Switch Kube Context interactively | ||
kubecm switch | ||
# Quick switch Kube Context | ||
kubecm switch dev | ||
``` | ||
|
||
### 切换 namespace | ||
|
||
```bash | ||
# Switch Namespace interactively | ||
kubecm namespace | ||
# or | ||
kubecm ns | ||
# change to namespace of kube-system | ||
kubecm ns kube-system | ||
``` | ||
![ns](../../static/ns.gif) | ||
|
||
## 交互式操作 | ||
|
||
<script id="asciicast-389595" src="https://asciinema.org/a/389595.js" async></script> | ||
|
||
更多的信息, 请看 [CLI 参考](https://kubecm.cloud/zh-cn/cli/kubecm_add) |