Skip to content

Commit

Permalink
doc(user-guide.md): update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Oct 19, 2023
1 parent dbd741a commit 6442689
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 3 additions & 2 deletions cmd/kube-router/kube-router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ func TestMainHelp(t *testing.T) {
}
docF.Close()

exp := append([]byte("```\n"), stderrBuf.Bytes()...)
exp := append([]byte("```sh\n"), stderrBuf.Bytes()...)
exp = append(exp, []byte("```\n")...)

if !bytes.Contains(docBuf.Bytes(), exp) {
t.Errorf("docs/user-guide.md 'command line options' section does not match `kube-router --help`.\nExpected:\n%s", exp)
t.Errorf("docs/user-guide.md 'command line options' section does not match `kube-router --help`.\n"+
"Expected:\n%s", exp)
t.Errorf("\nGot:\n%s", docBuf.Bytes())
}

Expand Down
16 changes: 7 additions & 9 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ need to use an overlay network in an Azure environment with kube-router, please
## deployment

Depending on what functionality of kube-router you want to use, multiple deployment options are possible. You can use
the flags `--run-firewall`, `--run-router`, `--run-service-proxy` to selectively enable only required functionality of
kube-router.
the flags `--run-firewall`, `--run-router`, `--run-service-proxy`, `--run-loadbalancer` to selectively enable only
required functionality of kube-router.

Also you can choose to run kube-router as agent running on each cluster node. Alternativley you can run kube-router as
pod on each node through daemonset.

## command line options

```
```sh
Usage of kube-router:
--advertise-cluster-ip Add Cluster IP of the service to the RIB so that it gets advertises to the BGP peers.
--advertise-external-ip Add External IP of service to the RIB so that it gets advertised to the BGP peers.
Expand Down Expand Up @@ -164,17 +164,17 @@ wget -O /etc/cni/net.d/10-kuberouter.conf https://raw.githubusercontent.com/clou
## running as daemonset
This is quickest way to deploy kube-router in Kubernetes v1.8+ (**dont forget to ensure the requirements above**).
This is quickest way to deploy kube-router in Kubernetes (**dont forget to ensure the requirements above**).
Just run:
```sh
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kube-router-all-service-daemonset.yaml
```
Above will run kube-router as pod on each node automatically. You can change the arguments in the daemonset definition
as required to suit your needs. Some samples can be found at
https://github.com/cloudnativelabs/kube-router/tree/master/daemonset with different argument to select set of the
services kube-router should run.
as required to suit your needs. Some sample deployment configuration can be found
[in our daemonset examples](https://github.com/cloudnativelabs/kube-router/tree/master/daemonset) with different
arguments used to select a set of the services kube-router should run.
## running as agent
Expand Down Expand Up @@ -216,7 +216,6 @@ and if you want to move back to kube-proxy then clean up config done by kube-rou
and run kube-proxy with the configuration you have.

## Advertising IPs
kube-router can advertise Cluster, External and LoadBalancer IPs to BGP peers.
Expand Down Expand Up @@ -247,7 +246,6 @@ Advertising LoadBalancer IPs works by inspecting the services `status.loadBalanc
LoadBalancers like for example MetalLb. This has been successfully tested together with
[MetalLB](https://github.com/google/metallb) in ARP mode.

## Hairpin Mode

Communication from a Pod that is behind a Service to its own ClusterIP:Port is not supported by default. However, it
Expand Down

0 comments on commit 6442689

Please sign in to comment.