Commit caf79bab authored by 金戟's avatar 金戟
Browse files

doc: add recover command

parent 9af416aa
Showing with 98 additions and 10 deletions
+98 -10
Ktctl Clean
---
Delete unavailing resources created by kt from kubernetes cluster. Available options:
Delete unavailing resources created by kt from kubernetes cluster. Basic usage:
```bash
ktctl clean
```
Available options:
```
--dryRun Only print name of deployments to be deleted
......
Ktctl Connect
---
Create a network tunnel to kubernetes cluster. Available options:
Create a network tunnel to kubernetes cluster. Basic usage:
```bash
ktctl connect
```
Available options:
```
--mode value Connect mode 'tun2socks' or 'sshuttle' (default: "tun2socks")
......
Ktctl Exchange
---
Redirect all requests of specified kubernetes service to local. Available options:
Redirect all requests of specified kubernetes service to local. Basic usage:
```bash
ktctl exchange <TargetService> --expose <LocalPort>:<TargetServicePort>
```
Available options:
```
--mode value Exchange method 'selector', 'scale' or 'ephemeral'(experimental) (default: "selector")
......
Ktctl Mesh
---
Redirect marked requests of specified kubernetes service to local. Available options:
Redirect marked requests of specified kubernetes service to local. Basic usage:
```bash
ktctl mesh <TargetService> --expose <LocalPort>:<TargetServicePort>
```
Available options:
```
--mode value Mesh method 'auto' or 'manual' (default: "auto")
......
Ktctl Preview
---
Expose a local service to kubernetes cluster. Available options:
Expose a local service to kubernetes cluster. Basic usage:
```bash
ktctl preview <NewService> --expose <LocalPort>:<NewServicePort>
```
Available options:
```
--expose value Ports to expose, use ',' separated, in [port] or [local:remote] format, e.g. 7001,8080:80
......
Ktctl Recover
---
Restore traffic of specified kubernetes service changed by exchange or mesh. Basic usage:
```bash
ktctl recover <TargetService>
```
No extra parameter available.
Special notice:
- This command should only use for restore traffic redirect made by KtConnect `0.3.2` or above. If there are still `0.3.1` or below version user in the cluster, it's better to wait the user quit himself or use `ktctl clean` command to automatically clean up expired resource and restore the network traffic
Ktctl Clean
---
用于清理集群里已超期的KT代理容器。子命令参数如下:
用于清理集群里已超期的KT代理容器。基本用法如下:
```bash
ktctl clean
```
命令可选参数:
```
--dryRun 只打印要删除的Kubernetes资源名称,不删除资源
......
Ktctl Connect
---
用于从本地连接到集群。子命令参数如下:
用于从本地连接到集群。基本用法如下:
```bash
ktctl connect
```
命令可选参数:
```text
--mode value 与集群建立虚拟连接的方式,可选值为 "tun2socks"(默认)和 "sshuttle"(仅限Linux/Mac)
......
Ktctl Exchange
---
用于使用本地服务替换集群中的Service实例。子命令参数如下:
用于使用本地服务替换集群中的Service实例。基本用法如下:
```bash
ktctl exchange <目标服务名> --expose <本地端口>:<目标服务端口>
```
命令可选参数:
```text
--mode value 重定向网络请求的方法,可选值为 "selector"(默认),"scale" 和 "ephemeral"(实验性功能)
......
Ktctl Mesh
---
用于将指定服务的部分流量重定向到本地。子命令参数如下:
用于将指定服务的部分流量重定向到本地。基本用法如下:
```bash
ktctl mesh <目标服务名> --expose <本地端口>:<目标服务端口>
```
命令可选参数:
```
--mode value 实现流量重定向的路由方式,可选值为 "auto"(默认)和 "manual"
......
Ktctl Preview
---
用于将本地服务添加到Kubernetes集群。子命令参数如下:
用于将本地服务添加到Kubernetes集群。基本用法如下:
```bash
ktctl preview <新建服务名> --expose <本地端口>:<新建服务端口>
```
命令可选参数:
```
--expose value 指定本地服务监听的端口,格式为`port`或`local:remote`,多个端口用逗号分隔,例如:7001,8080:80
......
Ktctl Recover
---
用于立即恢复指定服务被`exchange``mesh`命令重定向的流量。基本用法如下:
```bash
ktctl recover <目标服务名>
```
该命令暂无可选参数。
特别说明:
- 该命令仅适用于恢复由KtConnect `0.3.2`及以上版本创建的流量重定向。若集群中有KtConnect `0.3.1`及以下版本的用户,依然建议等待使用者正常退出或异常失联超时后,使用`ktctl clean`命令清理集群残留资源并恢复流量
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment