diff --git a/.all-contributorsrc b/.all-contributorsrc index f742233b..8ec96c23 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -5,8 +5,7 @@ "repoHost": "https://github.com", "files": [ "README.md", - "docs/en-us/contribute.md", - "docs/zh-cn/contribute.md" + "docs/en-us/contribute.md" ], "imageSize": 100, "commit": true, diff --git a/docs/index.html b/docs/index.html index 2b76c813..d8965768 100644 --- a/docs/index.html +++ b/docs/index.html @@ -68,12 +68,10 @@ search: { placeholder: { '/': 'Type to search', - '/zh-cn/': '搜索', '/en-us/': 'Type to search' }, noData: { '/': 'No Results', - '/zh-cn/': '找不到结果', '/en-us/': 'No Results' } }, diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md deleted file mode 100644 index 4efda635..00000000 --- a/docs/zh-cn/README.md +++ /dev/null @@ -1,86 +0,0 @@ -

- Kubecm -

- -![Go version](https://img.shields.io/github/go-mod/go-version/sunny0826/kubecm) -![Go](https://github.com/sunny0826/kubecm/workflows/Go/badge.svg?branch=master) -[![Go Report Card](https://goreportcard.com/badge/github.com/sunny0826/kubecm)](https://goreportcard.com/report/github.com/sunny0826/kubecm) -![GitHub](https://img.shields.io/github/license/sunny0826/kubecm.svg) -[![GitHub release](https://img.shields.io/github/release/sunny0826/kubecm)](https://github.com/sunny0826/kubecm/releases) -[![codecov](https://codecov.io/gh/sunny0826/kubecm/branch/master/graph/badge.svg?token=KGTLBQ8HYZ)](https://codecov.io/gh/sunny0826/kubecm) -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6065/badge)](https://bestpractices.coreinfrastructure.org/projects/6065) - -List, switch, add, delete and more interactive operations to manage kubeconfig. It also supports kubeconfig management from cloud. - -```text - - Manage your kubeconfig more easily. - - -██ ██ ██ ██ ██████ ███████ ██████ ███ ███ -██ ██ ██ ██ ██ ██ ██ ██ ████ ████ -█████ ██ ██ ██████ █████ ██ ██ ████ ██ -██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ -██ ██ ██████ ██████ ███████ ██████ ██ ██ - - Tips Find more information at: https://kubecm.cloud - -Usage: - kubecm [command] - -Available Commands: - add Add KubeConfig to $HOME/.kube/config - alias Generate alias for all contexts - clear Clear lapsed context, cluster and user - cloud Manage kubeconfig from cloud - completion Generate completion script - create Create new KubeConfig(experiment) - delete Delete the specified context from the kubeconfig - help Help about any command - list List KubeConfig - merge Merge multiple kubeconfig files into one - namespace Switch or change namespace interactively - rename Rename the contexts of kubeconfig - switch Switch Kube Context interactively - version Print version info - -Flags: - --config string path of kubeconfig (default "$HOME/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - -h, --help help for kubecm - --ui-size int number of list items to show in menu at once (default 4) - -Use "kubecm [command] --help" for more information about a command. -``` - -## 演示 - - - -## 安装 -使用 [Krew](https://krew.sigs.k8s.io/): - -```bash -kubectl krew install kc -``` - -使用 Homebrew: - -```bash -brew install kubecm -``` - -下载可执行文件: - -[Download the binary](https://github.com/sunny0826/kubecm/releases) - -## 鸣谢 - -- [JetBrains IDEs](https://www.jetbrains.com/?from=kubecm) - -

- - JetBrains logo - -

diff --git a/docs/zh-cn/_sidebar.md b/docs/zh-cn/_sidebar.md deleted file mode 100644 index 961d2080..00000000 --- a/docs/zh-cn/_sidebar.md +++ /dev/null @@ -1,18 +0,0 @@ -* [介绍](/zh-cn/introduction.md) -* [安装](/zh-cn/install.md) -* CLI 参考 - * [add](/zh-cn/cli/kubecm_add.md) - * [cloud](/zh-cn/cli/kubecm_cloud.md) - * [create(实验性)](/zh-cn/cli/kubecm_create.md) - * [alias](/zh-cn/cli/kubecm_alias.md) - * [completion](/zh-cn/cli/kubecm_completion.md) - * [delete](/zh-cn/cli/kubecm_delete.md) - * [list](/zh-cn/cli/kubecm_list.md) - * [merge](/zh-cn/cli/kubecm_merge.md) - * [namespace](/zh-cn/cli/kubecm_namespace.md) - * [rename](/zh-cn/cli/kubecm_rename.md) - * [switch](/zh-cn/cli/kubecm_switch.md) - * [clear](/en-us/cli/kubecm_clear.md) - * [version](/zh-cn/cli/kubecm_version.md) - * [export](/zh-cn/cli/kubecm_export.md) -* [贡献](/zh-cn/contribute.md) \ No newline at end of file diff --git a/docs/zh-cn/cli/kubecm.md b/docs/zh-cn/cli/kubecm.md deleted file mode 100644 index 1a84077c..00000000 --- a/docs/zh-cn/cli/kubecm.md +++ /dev/null @@ -1,45 +0,0 @@ -## kubecm - -KubeConfig Manager. - -### Synopsis - - -  - Manage your kubeconfig more easily.  -  - -██ ██ ██ ██ ██████ ███████ ██████ ███ ███  -██ ██ ██ ██ ██ ██ ██ ██ ████ ████  -█████ ██ ██ ██████ █████ ██ ██ ████ ██  -██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██  -██ ██ ██████ ██████ ███████ ██████ ██ ██ - - Tips  Find more information at: https://kubecm.cloud - - -### Options - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -h, --help help for kubecm - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` - -### SEE ALSO - -* [kubecm add](kubecm_add.md) - Add KubeConfig to $HOME/.kube/config -* [kubecm alias](kubecm_alias.md) - Generate alias for all contexts -* [kubecm clear](kubecm_clear.md) - Clear lapsed context, cluster and user -* [kubecm completion](kubecm_completion.md) - Generate completion script -* [kubecm create](kubecm_create.md) - Create new KubeConfig(experiment) -* [kubecm delete](kubecm_delete.md) - Delete the specified context from the kubeconfig -* [kubecm list](kubecm_list.md) - List KubeConfig -* [kubecm merge](kubecm_merge.md) - Merge multiple kubeconfig files into one -* [kubecm namespace](kubecm_namespace.md) - Switch or change namespace interactively -* [kubecm rename](kubecm_rename.md) - Rename the contexts of kubeconfig -* [kubecm switch](kubecm_switch.md) - Switch Kube Context interactively -* [kubecm version](kubecm_version.md) - Print version info - diff --git a/docs/zh-cn/cli/kubecm_add.md b/docs/zh-cn/cli/kubecm_add.md deleted file mode 100644 index 111657eb..00000000 --- a/docs/zh-cn/cli/kubecm_add.md +++ /dev/null @@ -1,54 +0,0 @@ -## kubecm add - -将 KubeConfig 加入到 `$HOME/.kube/config` - -### 简介 - -将 KubeConfig 加入到 `$HOME/.kube/config` - -``` -kubecm add [flags] -``` - -### 示例 - -``` -# Merge test.yaml with $HOME/.kube/config -kubecm add -f test.yaml -# Merge test.yaml with $HOME/.kube/config and add a prefix before context name -kubecm add -cf test.yaml --context-prefix test -# Merge test.yaml with $HOME/.kube/config and define the attributes used for composing the context name -kubecm add -f test.yaml --context-template user,cluster -# Merge test.yaml with $HOME/.kube/config, define the attributes used for composing the context name and add a prefix before context name -kubecm add -f test.yaml --context-template user,cluster --context-prefix demo -# Merge test.yaml with $HOME/.kube/config and override context name, it's useful if there is only one context in the kubeconfig file -kubecm add -f test.yaml --context-name test -# Merge test.yaml with $HOME/.kube/config and select the context to be added in interactive mode -kubecm add -f test.yaml --select-context -# Merge test.yaml with $HOME/.kube/config and specify the context to be added -kubecm add -f test.yaml --context context1,context2 -# Add kubeconfig from stdin -cat /etc/kubernetes/admin.conf | kubecm add -f - -``` - -### 选项 - -``` - --context strings specify the context to be added - --context-name string override context name when add kubeconfig context, when context-name is set, context-prefix and context-template parameters will be ignored - --context-prefix string add a prefix before context name - --context-template strings define the attributes used for composing the context name, available values: filename, user, cluster, context, namespace (default [context]) - -c, --cover overwrite local kubeconfig files - -f, --file string path to merge kubeconfig files - -h, --help help for add - --select-context select the context to be added in interactive mode -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_alias.md b/docs/zh-cn/cli/kubecm_alias.md deleted file mode 100644 index 4bf127f8..00000000 --- a/docs/zh-cn/cli/kubecm_alias.md +++ /dev/null @@ -1,38 +0,0 @@ -## kubecm alias - -为所有 contexts 生成 alias,可自动将其注入到 `.zshrc` 或 `.bash_profile` 中。 - -### 简介 - -为所有 contexts 生成 alias,可自动将其注入到 `.zshrc` 或 `.bash_profile` 中。 - -``` -kubecm alias -``` - -### 示例 - -``` - -$ kubecm alias -o zsh -# add context to ~/.zshrc -$ kubecm alias -o bash -# add context to ~/.bash_profile - -``` - -### 选项 - -``` - -h, --help help for alias - -o, --out string output to ~/.zshrc or ~/.bash_profile -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_clear.md b/docs/zh-cn/cli/kubecm_clear.md deleted file mode 100644 index 6585efe2..00000000 --- a/docs/zh-cn/cli/kubecm_clear.md +++ /dev/null @@ -1,37 +0,0 @@ -## kubecm clear - -清理 kubeconfig 中失效的 `context`, `cluster` 和 `user` - -### 简介 - -默认情况下会清理 `~/.kube/confg` 中失效的 `context`, `cluster` 和 `user`,后跟非默认的 kubeconfig 路径,可以清理指定文件,支持指定多文件。 - -``` -kubecm clear -``` - -### 示例 - -``` - -# Clear lapsed context, cluster and user (default is /Users/saybot/.kube/config) -kubecm clear -# 自定义清理 -kubecm clear config.yaml test.yaml - -``` - -### Options - -``` - -h, --help help for clear -``` - -### Options inherited from parent commands - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_cloud.md b/docs/zh-cn/cli/kubecm_cloud.md deleted file mode 100644 index aa7cbbec..00000000 --- a/docs/zh-cn/cli/kubecm_cloud.md +++ /dev/null @@ -1,32 +0,0 @@ -## kubecm cloud - -管理云上的 KubeConfig - -### Synopsis - -管理云上的 KubeConfig - -### Options - -``` - --cluster_id string kubernetes cluster id - -h, --help help for cloud - --provider string public cloud - --region_id string cloud region id -``` - -### Options inherited from parent commands - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` - -### SEE ALSO - -* [kubecm](kubecm.md) - KubeConfig Manager. -* [kubecm cloud add](kubecm_cloud_add.md) - Add kubeconfig from cloud -* [kubecm cloud list](kubecm_cloud_list.md) - List Cluster from cloud - diff --git a/docs/zh-cn/cli/kubecm_cloud_add.md b/docs/zh-cn/cli/kubecm_cloud_add.md deleted file mode 100644 index 174e7731..00000000 --- a/docs/zh-cn/cli/kubecm_cloud_add.md +++ /dev/null @@ -1,74 +0,0 @@ -## kubecm cloud add - -添加云上的 kubeconfig 到本地 - -### Synopsis - -添加云上的 kubeconfig 到本地 - -``` -kubecm cloud add [flags] -``` - -### Examples - -``` - -# Supports AWS, Ali Cloud, Tencent Cloud and Rancher -# The AK/AS of the cloud platform will be retrieved directly -# if it exists in the environment variable, -# otherwise a prompt box will appear asking for it. - -# Set env AliCloud secret key -export ACCESS_KEY_ID=YOUR_AKID -export ACCESS_KEY_SECRET=YOUR_SECRET_KEY - -# Set env Tencent secret key -export TENCENTCLOUD_SECRET_ID=YOUR_SECRET_ID -export TENCENTCLOUD_SECRET_KEY=YOUR_SECRET_KEY - -# Set env Rancher secret key -export RANCHER_SERVER_URL=https://xxx -export RANCHER_API_KEY=YOUR_API_KEY - -# Set env AWS secret key -# Note: Please install the AWS CLI before normal use. -export AWS_ACCESS_KEY_ID=YOUR_AKID -export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY - -# Set env Azure secret key -export AZURE_SUBSCRIPTION_ID=YOUR_SUBSCRIPTION_ID -export AZURE_CLIENT_ID=YOUR_CLIENT_ID -export AZURE_CLIENT_SECRET=YOUR_CLIENT_SECRET -export AZURE_TENANT_ID=YOUR_TENANT_ID -export AZURE_OBJECT_ID=YOUR_OBJECT_ID - -# Interaction: select kubeconfig from the cloud -kubecm cloud add -# Add kubeconfig from cloud -kubecm cloud add --provider alibabacloud --cluster_id=xxxxxx - -``` - -### Options - -``` - -h, --help help for add -``` - -### Options inherited from parent commands - -``` - --cluster_id string kubernetes cluster id - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --provider string public cloud - --region_id string cloud region id - --ui-size int number of list items to show in menu at once (default 4) -``` - -### SEE ALSO - -* [kubecm cloud](kubecm_cloud.md) - Manage kubeconfig from cloud - diff --git a/docs/zh-cn/cli/kubecm_cloud_list.md b/docs/zh-cn/cli/kubecm_cloud_list.md deleted file mode 100644 index 87f8bfd6..00000000 --- a/docs/zh-cn/cli/kubecm_cloud_list.md +++ /dev/null @@ -1,59 +0,0 @@ -## kubecm cloud list - -列举云上的 KubeConfig - -### Synopsis - -列举云上的 KubeConfig - -``` -kubecm cloud list [flags] -``` - -### Examples - -``` - -# Supports Ali Cloud and Tencent Cloud -# The AK/AS of the cloud platform will be retrieved directly -# if it exists in the environment variable, -# otherwise a prompt box will appear asking for it. - -# Set env AliCloud secret key -export ACCESS_KEY_ID=xxx -export ACCESS_KEY_SECRET=xxx -# Set env Tencent secret key -export TENCENTCLOUD_SECRET_ID=xxx -export TENCENTCLOUD_SECRET_KEY=xxx -# Set env Rancher secret key -export RANCHER_SERVER_URL=https://xxx -export RANCHER_API_KEY=xxx -# Interaction: list kubeconfig from cloud -kubecm cloud list -# Add kubeconfig from cloud -kubecm cloud list --provider alibabacloud --cluster_id=xxxxxx - -``` - -### Options - -``` - -h, --help help for list -``` - -### Options inherited from parent commands - -``` - --cluster_id string kubernetes cluster id - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --provider string public cloud - --region_id string cloud region id - --ui-size int number of list items to show in menu at once (default 4) -``` - -### SEE ALSO - -* [kubecm cloud](kubecm_cloud.md) - Manage kubeconfig from cloud - diff --git a/docs/zh-cn/cli/kubecm_completion.md b/docs/zh-cn/cli/kubecm_completion.md deleted file mode 100644 index 184c2c68..00000000 --- a/docs/zh-cn/cli/kubecm_completion.md +++ /dev/null @@ -1,183 +0,0 @@ -## `kubecm` completion - -生成自动补全脚本 - -### 简介 - -请根据下面的指南进行操作为普通的 `kubecm` 和 `kubectl kc`(`kubectl` 插件)配置基本的自动补全功能。 - -#### 配置 `kubecm` 的自动补全 - -Bash: - -```shell -$ source <(kubecm completion bash) - -# 可以通过运行一次下面的命令来为将来的每一个 Shell 会话激活自动补全: -# Linux: -$ kubecm completion bash > /etc/bash_completion.d/kubecm - -# macOS: -$ kubecm completion bash > /usr/local/etc/bash_completion.d/kubecm - -# 在执行完毕后,你需要重新打开一个新的终端才能使补全脚本生效。 -``` - -Zsh: - -```shell -# 如果你当前的 zsh 环境中尚未激活自动补全的功能,你需要先激活它。你 -# 可以通过下面的命令来激活: - -$ echo "autoload -U compinit; compinit" >> ~/.zshrc - -# 可以通过运行一次下面的命令来为将来的每一个 Shell 会话激活自动补全: -$ kubecm completion zsh > "${fpath[1]}/_kubecm" - -# 在执行完毕后,你需要重新打开一个新的终端才能使补全脚本生效。 -``` - -fish: - -```shell -# 可以通过运行一次下面的命令来为当前的 Shell 会话激活自动补全: -$ kubecm completion fish | source - -# 可以通过运行一次下面的命令来为将来的每一个 Shell 会话激活自动补全: -$ kubecm completion fish > ~/.config/fish/completions/kubecm.fish - -# 在执行完毕后,你需要重新打开一个新的终端才能使补全脚本生效。 -``` - -PowerShell: - -```shell -# 可以通过运行一次下面的命令来为当前的 Shell 会话激活自动补全: -PS> kubecm completion powershell | Out-String | Invoke-Expression - -# 为将来的每一个 Shell 会话激活自动补全,请执行下面的命令: -PS> kubecm completion powershell > kubecm.ps1 -# 然后在 PowerShell 的 profile 中引入这个文件。 -``` - -#### 为作为 `kubectl` 插件的 `kubecm` 配置自动补全 - -与直接执行 `kubecm` 不同的是,在作为 `kubectl` 插件(即使用 [`krew`](https://krew.sigs.k8s.io/) 安装的 `kubecm`,或者以 `kubectl kc` 的形式调用)执行时,自动补全需要在[配置 `kubecm` 的自动补全](#配置-kubecm-的自动补全)的基础上进行一些额外的配置才能使 `kubectl kc` + TAB 时的自动补全生效。 - -> 原理是什么? -> -> 简而言之,`kubectl` 的插件会在 `$PATH` 环境变量中寻找遵循 `kubectl_complete-<插件名>` 命名规则的可执行文件作为**约定**,然后在调用 `kubectl <插件名>` 的时候由 `kubectl` 展开参数并传递参数给调用这个按约定配置的自动补全脚本。 - -因此,为了使 `kubectl kc` + TAB 的自动补全生效,下面有几种方案。 - -Note: **PowerShell 的自动补全无需额外配置,开箱即用。** - -##### 使用预编写的自动补全脚本 - -你可以通过执行下面的命令来下载预编写的自动补全脚本并完成配置: - -```shell -mkdir -p ~/.config/.kubectl-plugin-completions && \ - curl -LO "https://raw.githubusercontent.com/sunny0826/kubecm/master/hack/kubectl-plugin-completions/kubectl_complete-kc.sh" && \ - mv kubectl_complete-kc.sh ~/.config/.kubectl-plugin-completions/kubectl_complete-kc && \ - chmod +x ~/.config/.kubectl-plugin-completions/kubectl_complete-kc -``` - -将 `~/.config/.kubectl-plugin-completions` 目录追加到 `$PATH` 环境变量中,以满足 `kubectl` 插件的自动补全约定: - -Bash: - -```shell -echo 'export PATH=$PATH:~/.config/.kubectl-plugin-completions' >> ~/.bashrc -``` - -Zsh: - -```shell -echo 'export PATH=$PATH:~/.config/.kubectl-plugin-completions' >> ~/.zshrc -``` - -Fish: - -```shell -fish_add_path ~/.config/.kubectl-plugin-completions -``` - -##### 手动创建 - -1. 创建用于放置自动补全脚本的目录 `.config/.kubectl-plugin-completions`: - -```shell -mkdir -p ~/.config/.kubectl-plugin-completions -``` - -2. 填充下面的内容到该目录下一个名为 `kubectl_complete-kc` 的可执行文件中: - -```shell -#!/usr/bin/env sh - -# Call the __complete command passing it all arguments -kubectl kc __complete "$@" -``` - -你也可以通过下面的命令来一次性完成这一步骤: - -```shell -cat <~/.config/.kubectl-plugin-completions/kubectl_complete-kc -#!/usr/bin/env sh - -# Call the __complete command passing it all arguments -kubectl kc __complete "\$@" -EOF -``` - -3. 为该文件添加可执行权限: - -```shell -chmod +x ~/.config/.kubectl-plugin-completions/kubectl_complete-kc -``` - -4. 将该目录追加到 `$PATH` 环境变量中,以满足 `kubectl` 插件的自动补全约定: - -Bash: - -```shell -echo 'export PATH=$PATH:~/.config/.kubectl-plugin-completions' >> ~/.bashrc -``` - -Zsh: - -```shell -echo 'export PATH=$PATH:~/.config/.kubectl-plugin-completions' >> ~/.zshrc -``` - -Fish: - -```shell -fish_add_path ~/.config/.kubectl-plugin-completions -``` - -##### 使用 `kubectl-plugin_completion` 插件自动生成和配置 - -请参考 [`kubectl-plugin_completion`](https://github.com/marckhouzam/kubectl-plugin_completion) 插件的文档进行配置。 - ---- - -```shell -kubecm completion [bash|zsh|fish|powershell] [flags] -``` - -### 选项 - -``` - -h, --help help for completion -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_create.md b/docs/zh-cn/cli/kubecm_create.md deleted file mode 100644 index 71503c35..00000000 --- a/docs/zh-cn/cli/kubecm_create.md +++ /dev/null @@ -1,36 +0,0 @@ -## kubecm create(实验性) - -生成 KubeConfig(实验性) - -### 简介 - -交互式生成 KubeConfig(实验性) - -``` -kubecm create -``` - -### 示例 - -``` - -# Create new KubeConfig(experiment) -kubecm create - -``` - -### 选项 - -``` - -h, --help help for create -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` - diff --git a/docs/zh-cn/cli/kubecm_delete.md b/docs/zh-cn/cli/kubecm_delete.md deleted file mode 100644 index b30d5bc2..00000000 --- a/docs/zh-cn/cli/kubecm_delete.md +++ /dev/null @@ -1,39 +0,0 @@ -## kubecm delete - -删除指定 context - -### 简介 - -删除指定 context - -``` -kubecm delete [flags] -``` - -### 示例 - -``` - -# Delete the context interactively -kubecm delete -# Delete the context -kubecm delete my-context -# Deleting multiple contexts -kubecm delete my-context1 my-context2 - -``` - -### 选项 - -``` - -h, --help help for delete -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_export.md b/docs/zh-cn/cli/kubecm_export.md deleted file mode 100644 index 0d90d8e8..00000000 --- a/docs/zh-cn/cli/kubecm_export.md +++ /dev/null @@ -1,36 +0,0 @@ -## kubecm export - -导出指定 context - -### 简介 - -导出指定 context - -``` -kubecm export [flags] -``` - -### 示例 - -``` -# Export context to myconfig.yaml file -kubecm export -f myconfig.yaml my-context1 -# Export multiple contexts to myconfig.yaml file -kubecm export -f myconfig.yaml my-context1 my-context2 -``` - -### 选项 - -``` - -f, --file string Path to export kubeconfig files - -h, --help help for export -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_list.md b/docs/zh-cn/cli/kubecm_list.md deleted file mode 100644 index a04ad95e..00000000 --- a/docs/zh-cn/cli/kubecm_list.md +++ /dev/null @@ -1,40 +0,0 @@ -## kubecm ls - -列举 Context - -### 简介 - -列举 Context,可以通过后跟关键字,筛选出包含该关键字的 context,支持多关键字筛选,关键字之间是 `或` 的关系。 - -``` -kubecm list -``` - -### 示例 - -``` - -# List all the contexts in your KubeConfig file -kubecm list -# Aliases -kubecm ls -kubecm l -# Filter out keywords(Multi-keyword support) -kubecm ls kind k3s - -``` - -### 选项 - -``` - -h, --help help for ls -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_merge.md b/docs/zh-cn/cli/kubecm_merge.md deleted file mode 100644 index 6d043282..00000000 --- a/docs/zh-cn/cli/kubecm_merge.md +++ /dev/null @@ -1,53 +0,0 @@ -## kubecm merge - -合并选中的 KubeConfig - -### 简介 - -合并选中的 KubeConfig - -``` -kubecm merge [flags] -``` - -### 示例 - -``` -# Merge multiple kubeconfig -kubecm merge 1st.yaml 2nd.yaml 3rd.yaml -# Merge KubeConfig in the dir directory -kubecm merge -f dir -# Merge KubeConfig in the dir directory to the specified file. -kubecm merge -f dir --config kubecm.config -# Merge test.yaml with $HOME/.kube/config and add a prefix before context name -kubecm merge test.yaml --context-prefix test -# Merge test.yaml with $HOME/.kube/config and define the attributes used for composing the context name -kubecm merge test.yaml --context-template user,cluster -# Merge test.yaml with $HOME/.kube/config, define the attributes used for composing the context name and add a prefix before context name -kubecm merge test.yaml --context-template user,cluster --context-prefix demo -# Merge test.yaml with $HOME/.kube/config and select the context to be added in interactive mode -kubecm merge test.yaml --select-context -# Merge test.yaml with $HOME/.kube/config and specify the context to be added -kubecm merge test.yaml --context context1,context2 -``` - -### 选项 - -``` - -y, --assumeyes skip interactive file overwrite confirmation - --context strings specify the context to be merged - --context-prefix string add a prefix before context name - --context-template strings define the attributes used for composing the context name, available values: filename, user, cluster, context, namespace (default [context]) - -f, --folder string KubeConfig folder - -h, --help help for merge - --select-context select the context to be merged in interactive mode -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_namespace.md b/docs/zh-cn/cli/kubecm_namespace.md deleted file mode 100644 index 1884040b..00000000 --- a/docs/zh-cn/cli/kubecm_namespace.md +++ /dev/null @@ -1,43 +0,0 @@ -## kubecm namespace - -切换当前集群 namespace - -### 简介 - - -切换当前集群 namespace - - -``` -kubecm namespace [flags] -``` - -![ns](../../static/ns.gif) - -### 示例 - -``` - -# Switch Namespace interactively -kubecm namespace -# or -kubecm ns -# change to namespace of kube-system -kubecm ns kube-system - -``` - -### 选项 - -``` - -h, --help help for namespace -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_rename.md b/docs/zh-cn/cli/kubecm_rename.md deleted file mode 100644 index dc58e7e7..00000000 --- a/docs/zh-cn/cli/kubecm_rename.md +++ /dev/null @@ -1,35 +0,0 @@ -## kubecm rename - -重命名 context - -### 简介 - -重命名 context - -``` -kubecm rename [flags] -``` - -### 示例 - -``` - -# Renamed the context interactively -kubecm rename - -``` - -### 选项 - -``` - -h, --help help for rename -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_switch.md b/docs/zh-cn/cli/kubecm_switch.md deleted file mode 100644 index f83bea85..00000000 --- a/docs/zh-cn/cli/kubecm_switch.md +++ /dev/null @@ -1,42 +0,0 @@ -## kubecm switch - -交互式切换 Kube Context - -### 简介 - - -切换 Kube Context,可以直接切换或交互式切换。 - -**可以通过键入 `\` 来进行搜索** - -``` -kubecm switch [flags] -``` - -![switch](../../static/switch.gif) - -### 示例 - -``` - -# Switch Kube Context interactively -kubecm switch -# Quick switch Kube Context -kubecm switch dev - -``` - -### 选项 - -``` - -h, --help help for switch -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/cli/kubecm_version.md b/docs/zh-cn/cli/kubecm_version.md deleted file mode 100644 index 8b606ac1..00000000 --- a/docs/zh-cn/cli/kubecm_version.md +++ /dev/null @@ -1,26 +0,0 @@ -## kubecm version - -打印版本信息 - -### 简介 - -打印版本信息 - -``` -kubecm version [flags] -``` - -### 选项 - -``` - -h, --help help for version -``` - -### 全局选项 - -``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") - -m, --mac-notify enable to display Mac notification banner - -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) -``` diff --git a/docs/zh-cn/contribute.md b/docs/zh-cn/contribute.md deleted file mode 100644 index b141ce5b..00000000 --- a/docs/zh-cn/contribute.md +++ /dev/null @@ -1,61 +0,0 @@ -欢迎在 [issue](https://github.com/sunny0826/kubecm/issues/new) 中与作者交流或提交 [pull requests](https://github.com/sunny0826/kubecm/pulls),您的反馈对本项目的健康发展是十分重要的。 - -## Star History 📈 - -[![Star History Chart](https://api.star-history.com/svg?repos=sunny0826/kubecm&type=Date)](https://star-history.com/#sunny0826/kubecm) - -## 贡献者 ✨ - -感谢这些杰出的人 ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Xudong Guo
Xudong Guo

💻 📖 🚧
Cheng Wang
Cheng Wang

💻
Neko Ayaka
Neko Ayaka

💻
l1b0k
l1b0k

💻
Zhizhen He
Zhizhen He

💻
Hang Yu
Hang Yu

💻
dennislapchenko
dennislapchenko

💻
cnfatal
cnfatal

💻
Se7en
Se7en

💻 📖
Yarden Shoham
Yarden Shoham

💻 ⚠️ 📖
Vimsucks
Vimsucks

💻
Shunsuke Suzuki
Shunsuke Suzuki

💻
YS Liu
YS Liu

💻
Sarun Nuntaviriyakul
Sarun Nuntaviriyakul

💻
Max Anderson
Max Anderson

💻
Mario Fritschen
Mario Fritschen

💻
Jia Sui
Jia Sui

💻
AdamRussak
AdamRussak

💻
Rui Chen
Rui Chen

🚇
Michael Burman
Michael Burman

🐛 💻
Jan-Otto Kröpke
Jan-Otto Kröpke

💻
yxxhero
yxxhero

💻
- - Add your contributions - -
- - - - - \ No newline at end of file diff --git a/docs/zh-cn/install.md b/docs/zh-cn/install.md deleted file mode 100644 index 3f9ccefa..00000000 --- a/docs/zh-cn/install.md +++ /dev/null @@ -1,42 +0,0 @@ -提供多种安装途径。 - - - -#### ** Krew ** - -Using [Krew](https://krew.sigs.k8s.io/): - -```bash -kubectl krew install kc -``` - -#### ** Homebrew ** - -```bash -brew install sunny0826/tap/kubecm -``` - -#### ** 下载可执行文件 ** - -[![GitHub release](https://img.shields.io/github/release/sunny0826/kubecm)](https://github.com/sunny0826/kubecm/releases) - -```bash -VERSION=v0.27.1 # replace with the version you want, note the "v" prefix! -# linux x86_64 -curl -Lo kubecm.tar.gz https://github.com/sunny0826/kubecm/releases/download/${VERSION}/kubecm_${VERSION}_Linux_x86_64.tar.gz -# macos -curl -Lo kubecm.tar.gz https://github.com/sunny0826/kubecm/releases/download/${VERSION}/kubecm_${VERSION}_Darwin_x86_64.tar.gz -# windows -curl -Lo kubecm.tar.gz https://github.com/sunny0826/kubecm/releases/download/${VERSION}/kubecm_${VERSION}_Windows_x86_64.tar.gz - -# linux & macos -tar -zxvf kubecm.tar.gz kubecm -cd kubecm -sudo mv kubecm /usr/local/bin/ - -# windows -# Unzip kubecm.tar.gz -# Add the binary in to your $PATH -``` - - \ No newline at end of file diff --git a/docs/zh-cn/introduction.md b/docs/zh-cn/introduction.md deleted file mode 100644 index 38d98a83..00000000 --- a/docs/zh-cn/introduction.md +++ /dev/null @@ -1,66 +0,0 @@ - -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) - -## 交互式操作 - - - -更多的信息, 请看 [CLI 参考](./cli/kubecm_add.md) \ No newline at end of file