ubuntu@ip-172-30-0-62:~/mizar$ kubectl get vpcs vpc10
NAME IP PREFIX VNI DIVIDERS STATUS CREATETIME PROVISIONDELAY
vpc10 192.168.10.0 24 10 1 Provisioned
b. Run the following command to create a vpc with a duplicated vni.
And you will get the following vpc whose status is Error
ubuntu@ip-172-30-0-62:~/mizar$ kubectl get vpcs vpc11
NAME IP PREFIX VNI DIVIDERS STATUS CREATETIME PROVISIONDELAY
vpc11 192.168.11.0 24 10 1 Duplicate vni
c. Run the following command to create a vpc without vni
And you will get the following vpc whose vni has been set to a random number
ubuntu@ip-172-30-0-62:~/mizar$ kubectl get vpcs vpc12
NAME IP PREFIX VNI DIVIDERS STATUS CREATETIME PROVISIONDELAY
vpc12 192.168.10.0 24 2771449 1 Provisioned
The host 172.31.15.208 has been added as cluster gateway. So that all the subnets in the cluster, whose remote deployued flag is false) won't use the host to create bouncers
root@ip-172-31-2-32:~/mizar_cluster_scripts# kubectl get subnet net1
NAME IP PREFIX VNI VPC STATUS REMOTEDEPLOYED BOUNCERS CREATETIME PROVISIONDELAY
net1 192.168.0.0 24 2 vpc1 Provisioned 1
root@ip-172-31-2-32:~/mizar_cluster_scripts# kubectl get bouncers
NAME VPC NET IP MAC DROPLET STATUS CREATETIME PROVISIONDELAY
net1-b-31c84764-d798-4213-8b6c-c062994367bd vpc1 net1 172.31.15.85 0a:a7:d2:0e:4b:bb ip-172-31-15-85 Provisioned 2021-12-10T20:40:10.791154 0.591665
If a subnet remote deployed flag is true, it will use the given cluster gateway as bouncers
root@ip-172-31-2-32:~/mizar_cluster_scripts# kubectl get subnet net2
NAME IP PREFIX VNI VPC STATUS REMOTEDEPLOYED BOUNCERS CREATETIME PROVISIONDELAY
net2 192.168.122.0 24 2 vpc1 Provisioned true 1
root@ip-172-31-2-32:~/mizar_cluster_scripts# kubectl get bouncers
NAME VPC NET IP MAC DROPLET STATUS CREATETIME PROVISIONDELAY
net2-b-f0b83bb9-1c4b-4b44-942b-44f7bb722c73 vpc1 net2 172.31.15.208 0a:c5:74:b5:4b:65 ip-172-31-15-208 Provisioned 2021-12-10T20:40:10.948333 0.675322
There are two major changes.
Add a new VNI field in yaml files to create VPC using predefined VNI
If you don't have any vni settings, it will have a random vni set as usual. If there is duplicated vni, the vpc status will be updated to Error.
a. Run the following command to create a vpc with customized vni.
And you will get the following vpc with vni 10
b. Run the following command to create a vpc with a duplicated vni.
And you will get the following vpc whose status is Error
c. Run the following command to create a vpc without vni
And you will get the following vpc whose vni has been set to a random number
Added portal host to configmap
Verify the config has been added successfully
The host 172.31.15.208 has been added as cluster gateway. So that all the subnets in the cluster, whose remote deployued flag is false) won't use the host to create bouncers
If a subnet remote deployed flag is true, it will use the given cluster gateway as bouncers