diff --git a/README.md b/README.md index 3286f426..bfe2eace 100644 --- a/README.md +++ b/README.md @@ -48,34 +48,23 @@ With KubeVPN, empower yourself to develop applications entirely on your local PC ## QuickStart -#### Install from brew +### Install from brew (macOS / Linux) ```shell brew install kubevpn ``` -#### Install from custom krew index +### Install from custom krew index ( Windows / macOS / Linux) ```shell -( - kubectl krew index add kubevpn https://github.com/kubenetworks/kubevpn.git && \ - kubectl krew install kubevpn/kubevpn && kubectl kubevpn -) +kubectl krew index add kubevpn https://github.com/kubenetworks/kubevpn.git +kubectl krew install kubevpn/kubevpn +kubectl kubevpn ``` -#### Install from GitHub release +### Install from GitHub release ( Windows / macOS / Linux) -[LINK](https://github.com/kubenetworks/kubevpn/releases/latest) - -#### Install from build it manually - -```shell -( - git clone https://github.com/kubenetworks/kubevpn.git && \ - cd kubevpn && make kubevpn && ./bin/kubevpn -) - -``` +[https://github.com/kubenetworks/kubevpn/releases/latest](https://github.com/kubenetworks/kubevpn/releases/latest) ### Install bookinfo as demo application diff --git a/README_ZH.md b/README_ZH.md index 1a7c01a3..e0332930 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -43,36 +43,25 @@ Docker ## 快速开始 -#### 使用 brew 安装 +### 使用 brew 安装 (macOS / Linux) ```shell brew install kubevpn ``` -#### 从 自定义 Krew 仓库安装 +### 从 自定义 Krew 仓库安装 (Windows / macOS / Linux) ```shell -( - kubectl krew index add kubevpn https://github.com/kubenetworks/kubevpn.git && \ - kubectl krew install kubevpn/kubevpn && kubectl kubevpn -) +kubectl krew index add kubevpn https://github.com/kubenetworks/kubevpn.git +kubectl krew install kubevpn/kubevpn +kubectl kubevpn ``` -#### 从 Github release 下载编译好的二进制文件 +### 从 Github release 下载编译好的二进制文件 ( Windows / macOS / Linux) -[链接](https://github.com/kubenetworks/kubevpn/releases/latest) +[https://github.com/kubenetworks/kubevpn/releases/latest](https://github.com/kubenetworks/kubevpn/releases/latest) -#### 自己构建二进制文件 - -```shell -( - git clone https://github.com/kubenetworks/kubevpn.git && \ - cd kubevpn && make kubevpn && ./bin/kubevpn -) - -``` - -#### 安装 bookinfo 作为 demo 应用 +### 安装 bookinfo 作为 demo 应用 ```shell kubectl apply -f https://raw.githubusercontent.com/kubenetworks/kubevpn/master/samples/bookinfo.yaml diff --git a/cmd/kubevpn/cmds/alias.go b/cmd/kubevpn/cmds/alias.go index c0775b32..fe65663f 100644 --- a/cmd/kubevpn/cmds/alias.go +++ b/cmd/kubevpn/cmds/alias.go @@ -45,7 +45,7 @@ func CmdAlias(f cmdutil.Factory) *cobra.Command { Config file alias to execute command simply, just like ssh alias config It will read ~/.kubevpn/config.yaml file as config, also support special file path - by flag -f. It also support depends relationship, like one cluster api server needs to + by flag -f. It also supports depends relationship, like one cluster api server needs to access via another cluster, you can use syntax needs. it will do action to needs cluster first and then do action to target cluster `)), diff --git a/cmd/kubevpn/cmds/clone.go b/cmd/kubevpn/cmds/clone.go index fc306c85..0af532cd 100644 --- a/cmd/kubevpn/cmds/clone.go +++ b/cmd/kubevpn/cmds/clone.go @@ -33,25 +33,25 @@ func CmdClone(f cmdutil.Factory) *cobra.Command { var syncDir string cmd := &cobra.Command{ Use: "clone", - Short: i18n.T("Clone workloads to target-kubeconfig cluster with same volume、env、and network"), + Short: i18n.T("Clone workloads to run in target-kubeconfig cluster with same volume、env、and network"), Long: templates.LongDesc(i18n.T(` - Clone workloads to target-kubeconfig cluster with same volume、env、and network + Clone workloads to run into target-kubeconfig cluster with same volume、env、and network In this way, you can startup another deployment in same cluster or not, but with different image version, - it also support service mesh proxy. only traffic with special header will hit to cloned_resource. + it also supports service mesh proxy. only traffic with special header will hit to cloned_resource. `)), Example: templates.Examples(i18n.T(` # clone - - clone deployment in current cluster and current namespace + - clone deployment run into current cluster and current namespace kubevpn clone deployment/productpage - - clone deployment in current cluster with different namespace + - clone deployment run into current cluster with different namespace kubevpn clone deployment/productpage -n test - - clone deployment to another cluster + - clone deployment run into another cluster kubevpn clone deployment/productpage --target-kubeconfig ~/.kube/other-kubeconfig - - clone multiple workloads + - clone multiple workloads run into current cluster and current namespace kubevpn clone deployment/authors deployment/productpage or kubevpn clone deployment authors productpage @@ -62,7 +62,7 @@ func CmdClone(f cmdutil.Factory) *cobra.Command { # clone workloads which api-server behind of bastion host or ssh jump host kubevpn clone deployment/productpage --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem --headers a=1 - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ @@ -155,7 +155,7 @@ func CmdClone(f cmdutil.Factory) *cobra.Command { return nil }, } - cmd.Flags().StringToStringVarP(&options.Headers, "headers", "H", map[string]string{}, "Traffic with special headers (use `and` to match all headers) with reverse it to local PC, If not special, redirect all traffic to local PC. eg: --headers a=1 --headers b=2") + cmd.Flags().StringToStringVarP(&options.Headers, "headers", "H", map[string]string{}, "Traffic with special headers (use `and` to match all headers) with reverse it to target cluster cloned workloads, If not special, redirect all traffic to target cluster cloned workloads. eg: --headers a=1 --headers b=2") cmd.Flags().BoolVar(&config.Debug, "debug", false, "Enable debug mode or not, true or false") cmd.Flags().StringVar(&config.Image, "image", config.Image, "Use this image to startup container") cmd.Flags().BoolVar(&transferImage, "transfer-image", false, "transfer image to remote registry, it will transfer image "+config.OriginImage+" to flags `--image` special image, default: "+config.Image) diff --git a/cmd/kubevpn/cmds/config.go b/cmd/kubevpn/cmds/config.go index 7d651870..4be3f126 100644 --- a/cmd/kubevpn/cmds/config.go +++ b/cmd/kubevpn/cmds/config.go @@ -35,7 +35,7 @@ func cmdConfigAdd(f cmdutil.Factory) *cobra.Command { # proxy api-server which api-server behind of bastion host or ssh jump host kubevpn config add --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/connect.go b/cmd/kubevpn/cmds/connect.go index e4f8dbc4..d6d5f6bd 100644 --- a/cmd/kubevpn/cmds/connect.go +++ b/cmd/kubevpn/cmds/connect.go @@ -35,9 +35,9 @@ func CmdConnect(f cmdutil.Factory) *cobra.Command { Connect to kubernetes cluster network After connect to kubernetes cluster network, you can ping PodIP or - curl ServiceIP in local PC, it also support k8s DNS resolve. + curl ServiceIP in local PC, it also supports k8s DNS resolve. Like: curl authors/authors.default/authors.default.svc/authors.default.svc.cluster.local. - So you can startup your application in local PC. depends on anything in + So you can start up your application in local PC. depends on anything in k8s cluster is ok, connect to them just like in k8s cluster. `)), Example: templates.Examples(i18n.T(` @@ -47,7 +47,7 @@ func CmdConnect(f cmdutil.Factory) *cobra.Command { # Connect to api-server behind of bastion host or ssh jump host kubevpn connect --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/cp.go b/cmd/kubevpn/cmds/cp.go index 9a8c0535..ee937e21 100644 --- a/cmd/kubevpn/cmds/cp.go +++ b/cmd/kubevpn/cmds/cp.go @@ -45,7 +45,7 @@ var cpExample = templates.Examples(i18n.T(` # copy reverse proxy api-server behind of bastion host or ssh jump host kubevpn cp deployment/productpage --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/dev.go b/cmd/kubevpn/cmds/dev.go index 0aa979fe..e04eced1 100644 --- a/cmd/kubevpn/cmds/dev.go +++ b/cmd/kubevpn/cmds/dev.go @@ -33,7 +33,7 @@ func CmdDev(f cmdutil.Factory) *cobra.Command { Long: templates.LongDesc(i18n.T(` Startup your kubernetes workloads in local Docker container with same volume、env、and network - ## What did i do: + ## What did it do: - Download volume which MountPath point to, mount to docker container - Connect to cluster network, set network to docker container - Get all environment with command (env), set env to docker container @@ -54,7 +54,7 @@ func CmdDev(f cmdutil.Factory) *cobra.Command { # Develop workloads which api-server behind of bastion host or ssh jump host kubevpn dev deployment/productpage --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/get.go b/cmd/kubevpn/cmds/get.go index ea6fd989..0a7cff3c 100644 --- a/cmd/kubevpn/cmds/get.go +++ b/cmd/kubevpn/cmds/get.go @@ -34,7 +34,7 @@ func CmdGet(f cmdutil.Factory) *cobra.Command { # Get api-server behind of bastion host or ssh jump host kubevpn get deployment --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/proxy.go b/cmd/kubevpn/cmds/proxy.go index be3efa05..3e279580 100644 --- a/cmd/kubevpn/cmds/proxy.go +++ b/cmd/kubevpn/cmds/proxy.go @@ -63,7 +63,7 @@ func CmdProxy(f cmdutil.Factory) *cobra.Command { # Connect to api-server behind of bastion host or ssh jump host and proxy kubernetes resource traffic into local PC kubevpn proxy deployment/productpage --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem --headers a=1 - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/quit.go b/cmd/kubevpn/cmds/quit.go index add7405a..868768b0 100644 --- a/cmd/kubevpn/cmds/quit.go +++ b/cmd/kubevpn/cmds/quit.go @@ -23,7 +23,7 @@ func CmdQuit(f cmdutil.Factory) *cobra.Command { Use: "quit", Short: i18n.T("Quit kubevpn daemon grpc server"), Long: templates.LongDesc(i18n.T(` - Disconnect from cluster, leave proxy resources, quit daemon grpc server and cleanup dns/host + Disconnect from cluster, leave proxy resources, quit daemon grpc server and cleanup dns/hosts `)), Example: templates.Examples(i18n.T(` # before quit kubevpn, it will leave proxy resources to origin and disconnect from cluster diff --git a/cmd/kubevpn/cmds/reset.go b/cmd/kubevpn/cmds/reset.go index b0df398c..8dfd0a32 100644 --- a/cmd/kubevpn/cmds/reset.go +++ b/cmd/kubevpn/cmds/reset.go @@ -42,7 +42,7 @@ func CmdReset(f cmdutil.Factory) *cobra.Command { # Reset cluster api-server behind of bastion host or ssh jump host kubevpn reset --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────────┘ diff --git a/cmd/kubevpn/cmds/ssh.go b/cmd/kubevpn/cmds/ssh.go index 841010bf..3c1c0763 100644 --- a/cmd/kubevpn/cmds/ssh.go +++ b/cmd/kubevpn/cmds/ssh.go @@ -39,7 +39,7 @@ func CmdSSH(_ cmdutil.Factory) *cobra.Command { # Jump to server behind of bastion host or ssh jump host kubevpn ssh --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem - # It also support ProxyJump, like + # It also supports ProxyJump, like ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────┐ │ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ server │ └──────┘ └──────┘ └──────┘ └──────┘ └────────┘