Skip to content

Commit

Permalink
docs: update vlan docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Apr 20, 2020
1 parent d0544d8 commit 9b05fcc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The Kube-OVN community is waiting for you participation!
- **Namespaced Gateways**: Every Namespace can have a dedicated Gateway for Egress traffic.
- **Direct External Connectivity**:Pod IP can be exposed to external network directly.
- **Traffic Mirror**: Duplicated container network traffic for monitoring, diagnosing and replay.
- **Vlan Support**: Kube-OVN also support underlay Vlan mode network for better performance and throughput.
- **IPv6 Support**: Kube-OVN supports ipv6-only mode pod network.
- **ARM Support**: Kube-OVN can run on x86_64 and arm64 platforms.
- **TroubleShooting Tools**: Handy tools to diagnose, trace, monitor and dump container network traffic to help troubleshooting complicate network issues.
Expand Down Expand Up @@ -64,13 +65,13 @@ If you want to install Kubernetes from scratch, you can try [kubespray](https://
- [Dynamic QoS](docs/qos.md)
- [Gateway and Direct connect](docs/subnet.md#gateway)
- [Multi NIC Support](docs/multi-nic.md)
- [Vlan Support](docs/vlan.md)
- [Traffic Mirror](docs/mirror.md)
- [Webhook](docs/webhook.md)
- [IPv6](docs/ipv6.md)
- [Tracing/Diagnose/Dump Traffic with Kubectl Plugin](docs/kubectl-plugin.md)
- [Prometheus Integration](docs/prometheus.md)


## Contribution
We are looking forwards to your PR!

Expand Down
37 changes: 25 additions & 12 deletions docs/vlan.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
## How to use it
## Vlan Support

When you install vlan, you host need at least two ifname, and the second ifname can reconnection
**The Vlan support is still in early stage, the usage might change later**

### Label host interface name in every node
```bash
kubectl label node <Node on which to deploy OVN DB> ovn.kubernetes.io/host_interface_name=<host_interface_name>
```
By default, Kube-OVN use Geneve to encapsulate packets between hosts, which will build an overlay network above your infrastructure.
Kube-OVN also support underlay Vlan mode network for better performance and throughput.
In Vlan mode, the packets will send directly to physical switches with vlan tags.

### Install vlan
To enable Vlan mode, a dedicated network interface is required by container network.
The related switch port must work in trunk mode to accept 802.1q packets.

```bash
cd kube-ovn && sh dist/images/install-vlan.sh
```
By now, Geneve or Vlan network mode is a global install option, all container must work in the same network mode.
We are working at combine two networks in one cluster.

### Install Vlan mode

1. Get the installation script

`wget https://raw.githubusercontent.com/alauda/kube-ovn/master/dist/images/install.sh`

2. Edit the `install.sh`, modify `NETWORK_TYPE` to `vlan`, `VLAN_INTERFACE_NAME` to related host interface.

3. Install Kube-OVN

### Create vlan cr

```bash
apiVersion: kubeovn.io/v1
kind: Vlan
Expand All @@ -34,6 +44,9 @@ metadata:
```

### Create subnet

Multiple Subnets can bind to one Vlan

```bash
apiVersion: kubeovn.io/v1
kind: Subnet
Expand All @@ -50,7 +63,7 @@ spec:
- product
```

### Create samplepod
### Create sample pod
```bash
kubectl run samplepod --image=nginx --namespace=product
```
```

0 comments on commit 9b05fcc

Please sign in to comment.