Skip to content

Commit

Permalink
Merge pull request #95 from calmkart/master
Browse files Browse the repository at this point in the history
Refactoring: Refactored code, added watch service functionality, fixed several bugs, added a set of mainline tests
  • Loading branch information
cjimti authored Nov 22, 2019
2 parents 4f8f192 + edc1758 commit 766119c
Show file tree
Hide file tree
Showing 7 changed files with 863 additions and 345 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ Check out the [releases](https://github.com/txn2/kubefwd/releases) section on Gi
## Usage

Forward all services for the namespace `the-project`. Kubefwd finds the first Pod associated with each Kubernetes service found in the Namespace and port forwards it based on the Service spec to a local IP address and port. A domain name is added to your /etc/hosts file pointing to the local IP.
### Update
Forwarding of headlesss Service is currently supported, Kubefwd forward all Pods for headless service;

At the same time, the namespace-level service monitoring is supported. When a new service is created or the old service is deleted under the namespace, kubefwd can automatically start/end forwarding; Supports Pod-level forwarding monitoring. When the forwarded Pod is deleted (such as updating the deployment, etc.), the forwarding of the service to which the pod belongs is automatically restarted;
```bash
sudo kubefwd svc -n the-project
```
Expand Down
5 changes: 5 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ docker exec the-project curl -s elasticsearch:9200
## 用法

转发namespace `the-project`下的所有服务。 Kubefwd找到Kubernetess集群中,该namespace下对应的Service端口匹配的第一个Pod,并将其转发到本地IP地址和端口。同时service的域名将被添加到本地的 hosts文件中。

### 更新
当前已支持headlesss Service的转发,Kubefwd将转发所有headlesss Service的Pod;

同时支持namespace级服务监听,当namespace下有新Service创建或旧Service删除时,Kubefwd能够自动完成转发/结束转发;支持Pod级转发监听,当转发的Pod被删除时(如更新deployment等情况),自动重启该pod所属Service的转发;
```bash
sudo kubefwd svc -n the-project
```
Expand Down
Loading

0 comments on commit 766119c

Please sign in to comment.