mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-09-26 19:31:17 +08:00
hotfix: fix cmd run (#690)
This commit is contained in:
@@ -442,7 +442,7 @@ Waiting for deployment "productpage" rollout to finish: 1 old replicas are pendi
|
||||
Rollout successfully for deployments/productpage
|
||||
```
|
||||
|
||||
### Dev mode in local Docker 🐳
|
||||
### Run mode in local Docker 🐳
|
||||
|
||||
Run the Kubernetes pod in the local Docker container, and cooperate with the service mesh to intercept the traffic with
|
||||
the specified header to the local, or all the traffic to the local.
|
||||
|
@@ -391,7 +391,7 @@ Waiting for deployment "productpage" rollout to finish: 1 old replicas are pendi
|
||||
Rollout successfully for deployments/productpage
|
||||
```
|
||||
|
||||
### 本地进入开发模式 🐳
|
||||
### 本地进入运行模式 🐳
|
||||
|
||||
将 Kubernetes pod 运行在本地的 Docker 容器中,同时配合 service mesh, 拦截带有指定 header 的流量到本地,或者所有的流量到本地。这个开发模式依赖于本地
|
||||
Docker。
|
||||
|
@@ -30,7 +30,7 @@ func CmdRun(f cmdutil.Factory) *cobra.Command {
|
||||
var imagePullSecretName string
|
||||
var managerNamespace string
|
||||
cmd := &cobra.Command{
|
||||
Use: "dev TYPE/NAME [-c CONTAINER] [flags] -- [args...]",
|
||||
Use: "run TYPE/NAME [-c CONTAINER] [flags] -- [args...]",
|
||||
Short: i18n.T("Run kubernetes workloads in local Docker container"),
|
||||
Long: templates.LongDesc(i18n.T(`
|
||||
Run kubernetes workloads in local Docker container with same volume、env、and network
|
||||
|
@@ -38,32 +38,32 @@ func CmdSync(f cmdutil.Factory) *cobra.Command {
|
||||
Use: "sync",
|
||||
Short: i18n.T("Sync workloads run in current namespace with same volume、env、and network"),
|
||||
Long: templates.LongDesc(i18n.T(`
|
||||
Sync workloads run in current namespace with same volume、env、and network
|
||||
Sync local dir to workloads which run in current namespace with same volume、env、and network
|
||||
|
||||
In this way, you can startup another deployment in current namespace, but with different image version,
|
||||
it also supports service mesh proxy. only traffic with special header will hit to sync resource.
|
||||
`)),
|
||||
Example: templates.Examples(i18n.T(`
|
||||
# sync
|
||||
- sync deployment run in current namespace
|
||||
kubevpn sync deployment/productpage
|
||||
- sync deployment run in current namespace with sync ~/code to /code/app
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app
|
||||
|
||||
# sync with mesh, traffic with header foo=bar, will hit sync workloads, otherwise hit origin workloads
|
||||
kubevpn sync deployment/productpage --headers foo=bar
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --headers foo=bar
|
||||
|
||||
# sync workloads which api-server behind of bastion host or ssh jump host
|
||||
kubevpn sync deployment/productpage --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem --headers foo=bar
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/ssh.pem --headers foo=bar
|
||||
|
||||
# It also supports ProxyJump, like
|
||||
┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌────────────┐
|
||||
│ pc ├────►│ ssh1 ├────►│ ssh2 ├────►│ ssh3 ├─────►... ─────► │ api-server │
|
||||
└──────┘ └──────┘ └──────┘ └──────┘ └────────────┘
|
||||
kubevpn sync deployment/productpage --ssh-alias <alias> --headers foo=bar
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --ssh-alias <alias> --headers foo=bar
|
||||
|
||||
# Support ssh auth GSSAPI
|
||||
kubevpn sync deployment/productpage --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-keytab /path/to/keytab
|
||||
kubevpn sync deployment/productpage --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-cache /path/to/cache
|
||||
kubevpn sync deployment/productpage --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-password <PASSWORD>
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-keytab /path/to/keytab
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-cache /path/to/cache
|
||||
kubevpn sync deployment/productpage --sync ~/code:/code/app --ssh-addr <HOST:PORT> --ssh-username <USERNAME> --gssapi-password <PASSWORD>
|
||||
`)),
|
||||
Args: cobra.MatchAll(cobra.OnlyValidArgs, cobra.MinimumNArgs(1)),
|
||||
PreRunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
|
Reference in New Issue
Block a user