Avi Load Balancer integrates with Google Cloud Platform (GCP) for providing IPAM services to applications running on instances in GCP. This section explains how to create a GCP profile and configure GCP IPAM.
To create the IPAM Profile for GCP, follow the steps given below:
Create a GCP cloud.
Create the IPAM Profile and select the cloud of type GCP in the IPAM profile.
Use the cloud of TypeGCP with the following configuration:
Service Engine Project ID - Project A (Project Name of the SEs)
Service Engine Region - Region A (Region Name of the SEs)
Zones
VPC Project ID
VPC Network Name
VPC Subnet Name
Cloud Storage Project ID
Cloud Storage Bucket Name
As a prerequisite to creating a GCP IPAM, create a cloud named GCP Cloud, with the following inputs:
Service Engine Project ID - Project A (Project Name of the SEs)
Service Engine Region - Region A (Region Name of the SEs)
Zones
VPC Project ID
VPC Network Name
VPC Subnet Name
Cloud Storage Project ID
Cloud Storage Bucket Name
Option 1:
In the NEW IPAM/DNS PROFILE screen, specify the profile name.
Select Avi Vantage IPAM option from Type drop-down menu and select the previously created cloud – GCP Cloud – for the Cloud field.
Add Usable Networks and click SAVE.
Option 2:
Create a new GCP cloud or edit an existing cloud.
Navigate to IPAM/DNS tab.
In the IPAM Profile field, click the vertical ellipsis and then click Create.
Configure the NEW IPAM/DNS PROFILE as shown in Option 1.
Complete the Cloud configuration by clicking SAVE in the EDIT CLOUD screen.
GCP IPAM has been configured, and virtual services can now be provisioned.
On GCP only L3 scale out mode is supported for virtual services.
Some of the GCP zones might require the MTU to be lowered to 1400.
To set the MTU on the SEs, you can use the following CLI command:
configure serviceengineproperties se_runtime_properties global_mtu 1400 save save
The MTU value will take effect after the SEs are rebooted.
Assigning Floating IP
You can assign floating IP using the following CLI command:
++Truncated Output++ +------------------------------------+-----------------------------------------------------+ [admin:10-146-43-2]: virtualservice> vip index 1 [admin:10-146-43-2]: virtualservice:vip> auto_allocate_floating_ip Overwriting the previously entered value for auto_allocate_floating_ip [admin:10-146-43-2]: virtualservice:vip> save [admin:10-146-43-2]: virtualservice> save ++ Truncated Output++
Assigning floating IP is currently supported through the CLI only.
Auto-allocate Floating IP
All GCP resources will be created in the SEs project. Only auto-allocation of floating IP is supported.
++Truncated Output++ [2018-07-16 06:48:08,717] INFO [gcp_nlb.allocate_vip:63] old_vip_info: vip { addr: "55.55.55.100" type: V4 } alloc_fip: false || new_vip_info: vip { addr: "55.55.55.100" type: V4 } alloc_fip: true
You can also use Swagger APIs to auto-allocate a floating IP through a PUT
request as follows:
"vip" : [ { "availability_zone" : "aeiou", "ip6_address" : "", "subnet" : "", "port_uuid" : "aeiou", "subnet_uuid" : "aeiou", "avi_allocated_vip" : true, "vip_id" : "aeiou", "ip_address" : "", "auto_allocate_floating_ip" : true, * "enabled" : true, "floating_subnet6_uuid" : "aeiou", "auto_allocate_ip" : true, "subnet6" : "", "floating_ip" : "", "floating_subnet_uuid" : "aeiou", "avi_allocated_fip" : true, "subnet6_uuid" : "aeiou", "floating_ip6" : "", "ipam_network_subnet" : "", "network_ref" : "aeiou", "discovered_networks" : [ "" ]
Shared-VIP
Shared VIPs can be created on the same IP as shown in the image.
Configure GCP IPAM for Kubernetes/OpenShift
Kubernetes/OpenShift cloud is not supported in Avi Load Balancer.