Skip to content

Commit

Permalink
docs: update web site (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny0826 authored Sep 7, 2022
1 parent 5e17a99 commit f90c26a
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<img src="../../static/kubecm.png" title="KubeCM" alt="Kubecm" height="200" />
</p>

![Go version](https://img.shields.io/github/go-mod/go-version/sunny0826/kubecm?style=flat-square&logo=appveyor)
![Go](https://github.com/sunny0826/kubecm/workflows/Go/badge.svg?branch=master&style=flat-square&logo=appveyor)
[![Go Report Card](https://goreportcard.com/badge/github.com/sunny0826/kubecm?style=flat-square&logo=appveyor)](https://goreportcard.com/report/github.com/sunny0826/kubecm)
![GitHub](https://img.shields.io/github/license/sunny0826/kubecm.svg?style=flat-square&logo=appveyor)
[![GitHub release](https://img.shields.io/github/release/sunny0826/kubecm?style=flat-square&logo=appveyor)](https://github.com/sunny0826/kubecm/releases)

[GitHub](https://github.com/sunny0826/kubecm)
[Get Started](en-us/README)
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* [Install](/en-us/install.md)
* [Interactive operation](/en-us/interactive.md)
* [Introduction](/en-us/introduction.md)
* CLI References
* [kubecm add](/en-us/cli/kubecm_add.md)
* [kubecm alias](/en-us/cli/kubecm_alias.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/en-us/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
[![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.
Expand Down
2 changes: 1 addition & 1 deletion docs/en-us/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* [Introduction](/en-us/introduction.md)
* [Install](/en-us/install.md)
* [Interactive operation](/en-us/interactive.md)
* CLI References
* [add](/en-us/cli/kubecm_add.md)
* [cloud](/en-us/cli/kubecm_cloud.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/en-us/cli/kubecm_namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Switch or change namespace interactively
kubecm namespace [flags]
```

![ns](../../static/ns.gif)

### Examples

```
Expand Down
1 change: 0 additions & 1 deletion docs/en-us/interactive.md

This file was deleted.

66 changes: 66 additions & 0 deletions docs/en-us/introduction.md
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)
7 changes: 2 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
2 changes: 2 additions & 0 deletions docs/zh-cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
[![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.
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* [介绍](/zh-cn/introduction.md)
* [安装](/zh-cn/install.md)
* [交互式操作](/zh-cn/interactive.md)
* CLI 参考
* [add](/zh-cn/cli/kubecm_add.md)
* [cloud](/zh-cn/cli/kubecm_cloud.md)
Expand Down
1 change: 0 additions & 1 deletion docs/zh-cn/interactive.md

This file was deleted.

66 changes: 66 additions & 0 deletions docs/zh-cn/introduction.md
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)

0 comments on commit f90c26a

Please sign in to comment.