-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<link rel="icon" href="favicon.ico"> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/buble.css"> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/buble.css" /> | ||
<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/buble.css">--> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/toc.css"> | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FV886PTDEN"></script> | ||
|
@@ -123,10 +124,6 @@ | |
<script src="//unpkg.com/docsify-fontawesome/dist/docsify-fontawesome.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/toc.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script> | ||
<script | ||
src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js" | ||
type="text/javascript"> | ||
</script> | ||
</body> | ||
|
||
</html> |
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) |