Skip to content

Commit a478a2d

Browse files
committed
Documentation for deploying Kube-router with KOPS
Done as part of #13. Still PR need to merged in upstream KOPS
1 parent 26bf5a3 commit a478a2d

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

Documentation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
- [General Setup](/README.md#getting-started)
66
- [Bootkube Deployment](bootkube.md)
7+
- [Kops deployment](kops.md)

Documentation/kops.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Kops Integration
2+
3+
The following instructions and examples demonstrate how to create a new [Kops](https://github.com/kubernetes/kops/) provisioned Kubernetes cluster using kube-router. Kube-router will provide an IPVS based service proxy (replacing kube-proxy), a network policy enforcer and also provides pod-to-pod networking.
4+
5+
6+
We are working to get the Kube-router support in Kops thorugh [#2606](https://github.com/kubernetes/kops/issues/2606). Till we get the support in upstream kops, you can use patched kops. Following instruction will walk through setting up cluster with patche kops
7+
8+
9+
## Instructions
10+
11+
- Please download the [Linux](https://s3.amazonaws.com/nodeupbkt/kops/1.6.0/linux/amd64/kops) or [Mac](https://s3.amazonaws.com/nodeupbkt/kops/1.6.0/darwin/amd64/kops) version of KOPS.
12+
13+
- Please run `kops create cluster --help` to see the support for kube-router in `--networking` flag. You should see as below
14+
15+
```
16+
--networking string Networking mode to use. kubenet (default), classic, external, kopeio-vxlan (or kopeio), weave, flannel, calico, canal, kube-router. (default "kubenet")
17+
```
18+
19+
- Please export KOPS_BASE_URL as environment variable `export KOPS_BASE_URL=https://nodeupbkt.s3.amazonaws.com/kops/1.6.0/` this will make kops to use patche protokube and nodeup with support for Kube-router
20+
21+
- Now you can deploy cluster with `--networking` flag set to `kube-router`. For e.g as shown below, all kops functionality remains same, so you configure rest of the param as you need.
22+
23+
```
24+
kops create cluster \
25+
--node-count 2 \
26+
--zones us-west-2a \
27+
--master-zones us-west-2a \
28+
--dns-zone aws.cloudnativelabs.net \
29+
--node-size t2.medium \
30+
--master-size t2.medium \
31+
--networking kube-router \
32+
mycluster.aws.cloudnativelabs.net
33+
```
34+
35+
- Now provision cluster
36+
37+
```
38+
kops update cluster mycluster.aws.cloudnativelabs.net --yes
39+
```
40+
41+
- It would take couple of minutes to provision cluster. Once cluster is provisioned please veriy kube-router running on each node `kubectl get pods --all-namespaces`
42+
43+
- At this point your cluster control plane is setup. One last is step is needed for pod connectivity. Since kube-router used host based routing, AWS instances will send and recieve traffic from IP in the pod CIDR range. AWS by default drops packets destined to instance and from instances with IP not in subnet range. So we will need to perform disable source and desintation check on each instance by running below command
44+
45+
```
46+
aws ec2 modify-instance-attribute --instance-id <instance id> --no-source-dest-check
47+
```
48+
49+
At this point your cluster is ready to deploy pods, services, network policies etc. Please report if you face any issue.
50+
51+
52+

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Alternatively you can download the prebuilt binary from https://github.com/cloud
5050
--peer-router The ip address of the external router to which all nodes will peer and advertise the cluster ip and pod cidr's
5151
```
5252

53+
### Try Kube-router with cluster installers
54+
55+
Please see the [steps](https://github.com/cloudnativelabs/kube-router/blob/master/Documentation/kops.md) to deploy Kubernetes cluster with Kube-router using [Kops](https://github.com/kubernetes/kops)
56+
57+
Please see the [steps](https://github.com/cloudnativelabs/kube-router/tree/master/contrib/bootkube) to deploy Kubernetes cluster with Kube-router using [bootkube](https://github.com/kubernetes-incubator/bootkube)
58+
5359
### deployment
5460

5561
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.
@@ -108,10 +114,6 @@ and if you want to move back to kube-proxy then clean up config done by kube-rou
108114
```
109115
and run kube-proxy with the configuration you have.
110116

111-
### Kube-router with cluster installers
112-
113-
Please see the [steps](https://github.com/cloudnativelabs/kube-router/tree/master/contrib/bootkube) to deploy Kubernetes cluster with Kube-router using bootkube
114-
115117
## Theory of Operation
116118

117119
Kube-router can be run as a agent or a pod (through daemonset) on each node and leverages standard Linux technologies **iptables, ipvs/lvs, ipset, iproute2**

0 commit comments

Comments
 (0)