-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# VPC peering connection | ||
## What is VPC peering? | ||
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either VPC can communicate with each other as if they are within the same network. | ||
|
||
![vpc-peering.png](vpc-peering.png) | ||
|
||
## Corresponding OVN model | ||
|
||
![vpc-peering-ovn.png](vpc-peering-ovn.png) | ||
|
||
## Usage | ||
1. Create two VPC with subnet | ||
```yaml | ||
kind: Vpc | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: vpc-1 | ||
spec: {} | ||
--- | ||
kind: Subnet | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: net1 | ||
spec: | ||
vpc: vpc-1 | ||
cidrBlock: 10.0.0.0/16 | ||
--- | ||
kind: Vpc | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: vpc-2 | ||
spec: {} | ||
--- | ||
kind: Subnet | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: net2 | ||
spec: | ||
vpc: vpc-2 | ||
cidrBlock: 172.31.0.0/16 | ||
``` | ||
|
||
2. Establish peer connection and configure static route between vpc-1 and vpc-2 | ||
```yaml | ||
kind: Vpc | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: vpc-1 | ||
spec: | ||
vpcPeerings: | ||
- remoteVpc: vpc-2 | ||
localConnectIP: 169.254.0.1/30 # The interconnection address for local vpc | ||
staticRoutes: | ||
- cidr: 172.31.0.0/16 # CIDR of remote vpc subnet | ||
nextHopIP: 169.254.0.2 # The interconnection address for remote vpc | ||
policy: policyDst | ||
--- | ||
kind: Vpc | ||
apiVersion: kubeovn.io/v1 | ||
metadata: | ||
name: vpc-1 | ||
spec: | ||
vpcPeerings: | ||
- remoteVpc: vpc-2 | ||
localConnectIP: 169.254.0.2/30 # The interconnection address for local vpc | ||
staticRoutes: | ||
- cidr: 10.0.0.0/16 # CIDR of remote vpc subnet | ||
nextHopIP: 169.254.0.1 # The interconnection address for remote vpc | ||
policy: policyDst | ||
``` | ||
The subnets of the two VPCs can communicate with each other now. | ||
|
||
## Limitation | ||
1. To avoid routing problems, the subnet CIDR of two VPCs cannot overlap. | ||
2. The interconnection address cannot overlap with the subnet CIDR. | ||
3. You cannot establish multiple VPC peer connections between two VPCs at the same time. | ||
4. Currently, only custom VPCs can use this feature. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters