diff --git a/README.md b/README.md index 5b0d4a88..e6e6bad5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6065/badge)](https://bestpractices.coreinfrastructure.org/projects/6065) [![All Contributors](https://img.shields.io/github/all-contributors/sunny0826/kubecm?color=ee8449&style=flat-square)](#contributors) -![demo](docs/static/Interaction.gif) +![demo](docs/static/interaction-lates.gif) ## πŸš€ Install @@ -48,8 +48,7 @@ For full documentation, please visit the KubeCM website: [https://kubecm.cloud]( ## 🎬 Demo -[![asciicast](https://asciinema.org/a/389595.svg)](https://asciinema.org/a/389595) - +[![asciicast](https://asciinema.org/a/663642.svg)](https://asciinema.org/a/663642) ## 🀝 Contribute diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 9f59935c..845376f2 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -8,5 +8,5 @@ ![GitHub](https://img.shields.io/github/license/sunny0826/kubecm.svg?style=flat-square&logo=apache) [![GitHub release](https://img.shields.io/github/release/sunny0826/kubecm?style=flat-square&logo=github)](https://github.com/sunny0826/kubecm/releases) -[GitHub](https://github.com/sunny0826/kubecm) -[Get Started](en-us/README) +[πŸ‘¨β€πŸ’» GitHub](https://github.com/sunny0826/kubecm) +[πŸš€ Get Started](en-us/introduction) diff --git a/docs/_navbar.md b/docs/_navbar.md index 252baf99..a02560e3 100644 --- a/docs/_navbar.md +++ b/docs/_navbar.md @@ -1,4 +1,2 @@ -- [Home](/) -- Language - - [δΈ­ζ–‡](/zh-cn/) - - [English](/en-us/) +- [🏑 Home](/) +- [πŸ’« Contribute](/en-us/contribute.md) diff --git a/docs/en-us/README.md b/docs/en-us/README.md index c13b79fc..f6a115c1 100644 --- a/docs/en-us/README.md +++ b/docs/en-us/README.md @@ -56,7 +56,7 @@ Use "kubecm [command] --help" for more information about a command. ## Demo - + ## Install Using [Krew](https://krew.sigs.k8s.io/): diff --git a/docs/en-us/cli/kubecm.md b/docs/en-us/cli/kubecm.md index 9dc52855..6181f9ac 100644 --- a/docs/en-us/cli/kubecm.md +++ b/docs/en-us/cli/kubecm.md @@ -22,6 +22,7 @@ KubeConfig Manager. ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -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 diff --git a/docs/en-us/cli/kubecm_add.md b/docs/en-us/cli/kubecm_add.md index 00f8ec8a..4b5320e6 100644 --- a/docs/en-us/cli/kubecm_add.md +++ b/docs/en-us/cli/kubecm_add.md @@ -50,6 +50,7 @@ cat /etc/kubernetes/admin.conf | kubecm add -f - ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_add_docs.md b/docs/en-us/cli/kubecm_add_docs.md index 1a4a2854..56df5f68 100644 --- a/docs/en-us/cli/kubecm_add_docs.md +++ b/docs/en-us/cli/kubecm_add_docs.md @@ -32,6 +32,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") -c, --cover overwrite local kubeconfig files + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_alias.md b/docs/en-us/cli/kubecm_alias.md index 94e402de..77c3ea5d 100644 --- a/docs/en-us/cli/kubecm_alias.md +++ b/docs/en-us/cli/kubecm_alias.md @@ -32,6 +32,7 @@ $ kubecm alias -o bash ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_alias_docs.md b/docs/en-us/cli/kubecm_alias_docs.md index 45d18f68..225f552a 100644 --- a/docs/en-us/cli/kubecm_alias_docs.md +++ b/docs/en-us/cli/kubecm_alias_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_clear.md b/docs/en-us/cli/kubecm_clear.md index f7f4b012..6cdc5132 100644 --- a/docs/en-us/cli/kubecm_clear.md +++ b/docs/en-us/cli/kubecm_clear.md @@ -14,7 +14,7 @@ kubecm clear ``` -# Clear lapsed context, cluster and user (default is /Users/I576375/.kube/config) +# Clear lapsed context, cluster and user (default is /Users/guoxudong/.kube/config) kubecm clear # Customised clear lapsed files kubecm clear config.yaml test.yaml @@ -31,6 +31,7 @@ kubecm clear config.yaml test.yaml ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_clear_docs.md b/docs/en-us/cli/kubecm_clear_docs.md index d0816443..48bcfdce 100644 --- a/docs/en-us/cli/kubecm_clear_docs.md +++ b/docs/en-us/cli/kubecm_clear_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_cloud.md b/docs/en-us/cli/kubecm_cloud.md index fc2b2067..79b5bf6e 100644 --- a/docs/en-us/cli/kubecm_cloud.md +++ b/docs/en-us/cli/kubecm_cloud.md @@ -19,6 +19,7 @@ Manage kubeconfig from cloud ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_cloud_add.md b/docs/en-us/cli/kubecm_cloud_add.md index 9573caa4..64ca2fe8 100644 --- a/docs/en-us/cli/kubecm_cloud_add.md +++ b/docs/en-us/cli/kubecm_cloud_add.md @@ -61,6 +61,7 @@ kubecm cloud add --provider alibabacloud --cluster_id=xxxxxx ``` --cluster_id string kubernetes cluster id --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner --provider string public cloud --region_id string cloud region id diff --git a/docs/en-us/cli/kubecm_cloud_docs.md b/docs/en-us/cli/kubecm_cloud_docs.md index 0d0109e5..1649b416 100644 --- a/docs/en-us/cli/kubecm_cloud_docs.md +++ b/docs/en-us/cli/kubecm_cloud_docs.md @@ -32,6 +32,7 @@ kubecm add docs ``` --cluster_id string kubernetes cluster id --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner --provider string public cloud --region_id string cloud region id diff --git a/docs/en-us/cli/kubecm_cloud_list.md b/docs/en-us/cli/kubecm_cloud_list.md index 97f9ff4d..ba241033 100644 --- a/docs/en-us/cli/kubecm_cloud_list.md +++ b/docs/en-us/cli/kubecm_cloud_list.md @@ -46,6 +46,7 @@ kubecm cloud list --provider alibabacloud --cluster_id=xxxxxx ``` --cluster_id string kubernetes cluster id --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner --provider string public cloud --region_id string cloud region id diff --git a/docs/en-us/cli/kubecm_create.md b/docs/en-us/cli/kubecm_create.md index 07f73260..5980e811 100644 --- a/docs/en-us/cli/kubecm_create.md +++ b/docs/en-us/cli/kubecm_create.md @@ -39,6 +39,7 @@ kubecm create --user test --namespace default --cluster-role view --context-name ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_delete.md b/docs/en-us/cli/kubecm_delete.md index 267bb2d6..c8c3c824 100644 --- a/docs/en-us/cli/kubecm_delete.md +++ b/docs/en-us/cli/kubecm_delete.md @@ -33,6 +33,7 @@ kubecm delete my-context1 my-context2 ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_delete_docs.md b/docs/en-us/cli/kubecm_delete_docs.md index 8246a063..984d0059 100644 --- a/docs/en-us/cli/kubecm_delete_docs.md +++ b/docs/en-us/cli/kubecm_delete_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_docs.md b/docs/en-us/cli/kubecm_docs.md index 9c747495..9f8de14b 100644 --- a/docs/en-us/cli/kubecm_docs.md +++ b/docs/en-us/cli/kubecm_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_export.md b/docs/en-us/cli/kubecm_export.md index d0951427..93365985 100644 --- a/docs/en-us/cli/kubecm_export.md +++ b/docs/en-us/cli/kubecm_export.md @@ -32,6 +32,7 @@ kubecm export -f myconfig.yaml my-context1 my-context2 ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_export_docs.md b/docs/en-us/cli/kubecm_export_docs.md index 53eaff98..b1b4614a 100644 --- a/docs/en-us/cli/kubecm_export_docs.md +++ b/docs/en-us/cli/kubecm_export_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_list.md b/docs/en-us/cli/kubecm_list.md index d74fb855..64b79e1b 100644 --- a/docs/en-us/cli/kubecm_list.md +++ b/docs/en-us/cli/kubecm_list.md @@ -21,6 +21,8 @@ kubecm ls kubecm l # Filter out keywords(Multi-keyword support) kubecm ls kind k3s +# Useful environment variables +KUBECM_DISABLE_K8S_MORE_INFO: it will disable the k8s more info in the output ``` @@ -34,6 +36,7 @@ kubecm ls kind k3s ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_list_docs.md b/docs/en-us/cli/kubecm_list_docs.md index a360492c..04094998 100644 --- a/docs/en-us/cli/kubecm_list_docs.md +++ b/docs/en-us/cli/kubecm_list_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_merge.md b/docs/en-us/cli/kubecm_merge.md index 73f59217..4fc577f3 100644 --- a/docs/en-us/cli/kubecm_merge.md +++ b/docs/en-us/cli/kubecm_merge.md @@ -49,6 +49,7 @@ kubecm merge test.yaml --context context1,context2 ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_merge_docs.md b/docs/en-us/cli/kubecm_merge_docs.md index 2b9baf53..6baa81ca 100644 --- a/docs/en-us/cli/kubecm_merge_docs.md +++ b/docs/en-us/cli/kubecm_merge_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_rename.md b/docs/en-us/cli/kubecm_rename.md index fc0f6d98..247d3565 100644 --- a/docs/en-us/cli/kubecm_rename.md +++ b/docs/en-us/cli/kubecm_rename.md @@ -29,6 +29,7 @@ kubecm rename ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_rename_docs.md b/docs/en-us/cli/kubecm_rename_docs.md index 852ffb09..f0d91957 100644 --- a/docs/en-us/cli/kubecm_rename_docs.md +++ b/docs/en-us/cli/kubecm_rename_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_switch.md b/docs/en-us/cli/kubecm_switch.md index cf60a30c..ff801a9c 100644 --- a/docs/en-us/cli/kubecm_switch.md +++ b/docs/en-us/cli/kubecm_switch.md @@ -33,6 +33,7 @@ kubecm switch dev ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_switch_docs.md b/docs/en-us/cli/kubecm_switch_docs.md index 801238de..32d33456 100644 --- a/docs/en-us/cli/kubecm_switch_docs.md +++ b/docs/en-us/cli/kubecm_switch_docs.md @@ -31,6 +31,7 @@ kubecm add docs ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/cli/kubecm_version.md b/docs/en-us/cli/kubecm_version.md index f0702b54..09038efd 100644 --- a/docs/en-us/cli/kubecm_version.md +++ b/docs/en-us/cli/kubecm_version.md @@ -20,6 +20,7 @@ kubecm version [flags] ``` --config string path of kubeconfig (default "$HOME/.kube/config") + --create Create a new kubeconfig file if not exists -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update -u, --ui-size int number of list items to show in menu at once (default 4) diff --git a/docs/en-us/install.md b/docs/en-us/install.md index aa95e528..f46e133e 100644 --- a/docs/en-us/install.md +++ b/docs/en-us/install.md @@ -4,6 +4,9 @@ Multiple installation paths are available. #### ** Krew ** +[![homebrew downloads](https://img.shields.io/homebrew/installs/dy/kubecm?style=for-the-badge&logo=homebrew&label=homebrew)](https://formulae.brew.sh/formula/kubecm) +[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/sunny0826/kubecm/total?style=for-the-badge&logo=github&label=github%20download)](https://github.com/sunny0826/kubecm/releases) + Using [Krew](https://krew.sigs.k8s.io/): ```bash diff --git a/docs/en-us/introduction.md b/docs/en-us/introduction.md index b132b110..c984e78c 100644 --- a/docs/en-us/introduction.md +++ b/docs/en-us/introduction.md @@ -4,23 +4,15 @@ It also supports kubeconfig management from cloud. ## Quick start -### Install +![demo](../static/interaction-lates.gif) -Using [Krew](https://krew.sigs.k8s.io/): +### πŸ’« Highlights -```bash -kubectl krew install kc -``` - -Using Homebrew: - -```bash -brew install kubecm -``` - -Source binary: - -[Download the binary](https://github.com/sunny0826/kubecm/releases) +- **Context Management**: Switch between Kubernetes **clusters** and **namespaces** in a single command. +- **Merge-Kubeconfig**: Merge multiple kubeconfig files into one. +- **Interactive Mode**: Interactively select the context you want to switch to. +- **Multi-Platform**: Support Linux, macOS, and Windows. +- **Auto-Completion**: Support auto-completion for Bash, Zsh, and Fish. ### Add kubeconfig @@ -57,10 +49,11 @@ kubecm ns # change to namespace of kube-system kubecm ns kube-system ``` -![ns](../../static/ns.gif) +![ns](../../static/ns-lates.gif) + ### Interactive operation - + more commands, please see [CLI References](./cli/kubecm_add.md) \ No newline at end of file diff --git a/docs/static/interaction-lates.gif b/docs/static/interaction-lates.gif new file mode 100644 index 00000000..d4c7035c Binary files /dev/null and b/docs/static/interaction-lates.gif differ diff --git a/docs/static/lates.gif b/docs/static/lates.gif new file mode 100644 index 00000000..5109d351 Binary files /dev/null and b/docs/static/lates.gif differ diff --git a/docs/static/ns-lates.gif b/docs/static/ns-lates.gif new file mode 100644 index 00000000..c1ed4374 Binary files /dev/null and b/docs/static/ns-lates.gif differ