Commit b8f221bf authored by Mengxin Liu's avatar Mengxin Liu Committed by oilbeater
Browse files

docs: add docs for vpc

Co-authored-by: default avatarfanriming <fanriming@chinatelecom.cn>
parent e7888f17
master acl acl-doc add_unknown_to_lsp allow-subnet bandwidth base/enable-dbg centralized-policy-route centralized_nat chore/show-gw-error chore/size ci/base ci/base-update ci/retry ci/trivy ci/update-kind cni crd-print db-monitor debug delete-qos delete-qos-queue delete_ip doc/custom-kubeconfig doc/optimization doc/vip docs/corigine docs/dpdk-pod-name docs/internal-port-vlan docs/optimize docs/optimize-cilium dualstack ecmp ecmp_static_route encap-ip env-check fdb feat/add-lint feat/dev-image feat/disable-ping-check feat/keep-chassis-name feat/ko feat/log feat/mcast feat/multicast feat/update-ovn feat/vlan-geneve feat/vlan-regex feat/vpc-lb fix-base fix-dnat fix-resubmit-limit fix/acl fix/avx512 fix/check-crd fix/cleanup fix/ecmp-hash fix/gw-del fix/ic-restart fix/init-ping fix/iptables fix/ipv6-svc fix/metrics-name fix/node-acl fix/np-log fix/ovn-healthcheck fix/ovn-northd-flipflop fix/pod-del fix/provider-check fix/reset-ovn0 fix/src-priority fix/subnet-without-protocol fix/udp-checksum fix/uninstall fix_make_kind_reload gc-vm-lsp internal-port internal_port internal_tcpdump ip join klog/v2 log/rotate ls-dnat-mod-dl-dst lsp-address lsp-ipam mahz-master monitor/metrics monitor_db_con multus multus-cni-update namespace nat-gw nbctl networkpolicy nodeport np_master ns-subnet ovn-controller ovn-db-recover ovs-nonstop ovs-win64-ci perf/4.18 perf/alias perf/libovsdb perf/optimization perf/route-port-address perf/stt perf/tuning-guide poc policy-route policy-route-1.8 port-group push-img qos qos-e2e qos-query refactor/other_config reflactor_note release-1.10 release-1.6 release-1.7 release-1.8 release-1.8-kubevirt release-1.8-lint release-1.8-monitor release-1.9 release-1.9-monitor release/prepare-1.9 remove_no_need_parms_svcAsName restore revert-1094-vpc-lb revert-1264-yd-master revert-1309-fixcni security/ubuntu-update security/update-ubuntu sg-acl stspod subnet subnet_ips svc sync-ovn-db test/fix-flaky testing update-ovs update/1.7-1.8 update/1.8.2 update_version upgrade-ovs vm-migrate vm-static-ip vpc-nat-gw webhook v1.10.7 v1.10.6 v1.10.5 v1.10.4 v1.10.3 v1.10.2 v1.10.1 v1.10.0 v1.9.14 v1.9.13 v1.9.12 v1.9.10 v1.9.9 v1.9.8 v1.9.7 v1.9.6 v1.9.5 v1.9.4 v1.9.3 v1.9.2 v1.9.1 v1.9.0 v1.8.14 v1.8.12 v1.8.11 v1.8.9 v1.8.8 v1.8.7 v1.8.6 v1.8.5 v1.8.4 v1.8.3 v1.8.2 v1.8.1 v1.8.0 v1.7.3 v1.7.2 v1.7.1 v1.7.0 v1.6.3 v1.6.2 v1.6.1 v1.6.0
No related merge requests found
Showing with 110 additions and 2 deletions
+110 -2
......@@ -37,6 +37,7 @@ The Kube-OVN community is waiting for you participation!
- **Vlan Support**: Kube-OVN also support underlay Vlan mode network for better performance and throughput.
- **DPDK Support**: DPDK application now can run in Pod with OVS-DPDK.
- **ARM Support**: Kube-OVN can run on x86_64 and arm64 platforms.
- **VPC Support**: Multi-tenant network with overlapped address spaces.
- **TroubleShooting Tools**: Handy tools to diagnose, trace, monitor and dump container network traffic to help troubleshooting complicate network issues.
- **Prometheus & Grafana Integration**: Exposing network quality metrics like pod/node/service/dns connectivity/latency in Prometheus format.
......@@ -80,6 +81,7 @@ If you want to install Kubernetes from scratch, you can try [kubespray](https://
- [Webhook](docs/webhook.md)
- [IPv6](docs/ipv6.md)
- [DualStack](docs/dual-stack.md)
- [VPC](docs/vpc.md)
- [Tracing/Diagnose/Dump Traffic with Kubectl Plugin](docs/kubectl-plugin.md)
- [Prometheus Integration](docs/prometheus.md)
- [Metrics](docs/ovn-ovs-monitor.md)
......
......@@ -210,7 +210,6 @@ Create the Pod Spec, name it pod.yaml
apiVersion: v1
kind: Pod
metadata:
generateName: testpmd-dpdk-
annotations:
k8s.v1.cni.cncf.io/networks: ovs-dpdk-br0, ovs-dpdk-br0
spec:
......@@ -255,7 +254,6 @@ The pod spec needs to be updated as shown below. The name of the volumeMount nee
<pre><code>apiVersion: v1
kind: Pod
metadata:
generateName: testpmd-dpdk-
annotations:
k8s.v1.cni.cncf.io/networks: ovs-dpdk-br0, ovs-dpdk-br0
spec:
......
docs/vpc.md 0 → 100644
# VPC
From v1.6.0, users can create custom VPC. Each VPC has independent address space, users can set overlapped CIDR, Subnet and Routes.
By default, all subnets without VPC options belong to the default VPC. All functions and usages remain unchanged for users who are not intended to use custom VPC.
*To connect custom VPC network with the external network, custom gateway is needed. This part of work is still work in progress.*
## Steps
1. Create a custom VPC
```
kind: Vpc
metadata:
name: test-vpc-1
spec:
namespaces:
- ns1
---
kind: Vpc
metadata:
name: test-vpc-2
spec: {}
```
The `namespace` list can limit which namespace can bind to the VPC, no limit if the list is empty
2. Create subnet
```
kind: Subnet
apiVersion: kubeovn.io/v1
metadata:
name: net1
spec:
vpc: test-vpc-1
namespaces:
- ns1
cidrBlock: 10.0.1.0/24
default: true
gatewayType: distributed
natOutgoing: false
private: false
protocol: IPv4
provider: ovn
underlayGateway: false
---
kind: Subnet
apiVersion: kubeovn.io/v1
metadata:
name: net2
spec:
vpc: test-vpc-2
cidrBlock: 10.0.1.0/24
default: false
gatewayType: distributed
natOutgoing: false
private: false
protocol: IPv4
provider: ovn
underlayGateway: false
```
In the examples above, two subnet in different VPCs can use same IP space
3. Create Pod
Pod can inherent VPC from the namespace or explicitly bind to subnet by annotation
```
apiVersion: v1
kind: Pod
metadata:
annotations:
ovn.kubernetes.io/logical_switch: ne1
namespace: default
name: vpc1-pod
---
apiVersion: v1
kind: Pod
metadata:
annotations:
ovn.kubernetes.io/logical_switch: ne2
namespace: default
name: vpc2-pod
```
4. Custom routes
VPC level policy routes to orchestrate traffic.
```
kind: Vpc
metadata:
name: test-vpc-1
spec:
staticRoutes:
- cidr: 0.0.0.0/0
nextHopIP: 10.0.1.254
policy: policyDst
- cidr: 172.31.0.0/24
nextHopIP: 10.0.1.253
policy: policySrc
```
## Custom VPC limitation
- Custom VPC can not access host network
- Not support DNS/Service/Loadbalancer
- Not support EIP/SNAT
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