Virtual Private Clouds (VPC)#

General information#

Virtual Private Cloud (VPC) provides an isolated network environment for running K2 Cloud services. VPC is analogous to Virtual Routing and Forwarding (VRF) on classic hardware routers. By default, subnets in different VPCs do not have IP connectivity, while subnets in one VPC are interconnected, thus forming a “routing domain”. IP connectivity between subnets inside a region is ensured regardless of which availability zone they are created in.

Users get complete control over the virtual network environment and can configure the VPC as they want: set their own address space, create subnets, and configure route tables. In addition, two-level traffic filtering using network access control lists (ACL) and security groups allows you to control access to resources deployed in the VPC.

In each project, a default VPC is created along with an attached internet gateway. A route through the gateway to the Internet (to 0.0.0.0./0) is automatically added to the main route table of this VPC. Other VPCs are created without an internet gateway. If Internet access is required for instances in these VPCs, you can, for example, connect them to the default VPC using a transit gateway, or create and attach an internet gateway to them. Either way, you will also need to configure routing.

In the VPC, you can create and/or configure the following services:

Note

Built-in VPC components such as a VPN gateway are not explicitly defined and cannot be configured by a user.

Note

Elastic IP addresses are created within the project and are bound to a specific VPC only when they are assigned to a network interface.

Public IP addresses#

Important

To announce public IP addresses, K2 Cloud uses ASN 51219.

Resources within VPC can be assigned public IP addresses from the following ranges:

  • 5.8.180.0/23

  • 5.35.64.0/24

  • 5.35.67.0/24

  • 5.35.72.0/21

  • 81.23.10.0/23

  • 91.184.232.0/22

  • 91.184.236.0/23

  • 91.184.238.0/24

  • 91.184.239.0/24

  • 93.183.64.0/22

  • 111.88.164.0/24

  • 178.216.96.0/21

  • 185.12.28.0/23

  • 185.12.30.0/24

  • 185.102.122.0/24

  • 194.242.120.0/22

  • 217.73.57.0/24

  • 217.73.58.0/23

  • 217.73.60.0/24

  • 217.73.62.0/23

These IP addresses are used for Internet access via NAT, as Elastic IP addresses, for assigning to VPN tunnels, and in other K2 Cloud services.

Billing#

VPCs are free of charge.

Available quotas#

The following default quotas are allocated to VPCs:

  • 4 VPCs in a project.

If necessary, you can increase quotas. To do this, contact the support service via the support portal or by email support@k2.cloud.

Create and delete VPC#

When creating a project, a default VPC is automatically created, where you can run instances right away. Along with the VPC, one subnet is created in each availability zone. You can use the default VPC, or you can create your own. If you don’t need a default VPC, you can delete it.

Creating a default VPC#

If there is no default VPC in the project, then you can create it:

Note

An Internet gateway is created along with the default VPC and attached to it. A route through the gateway to the Internet (to 0.0.0.0./0) is automatically added to the main route table of this VPC.

  1. In the top menu of the web interface, select the project and region where you want to create a default VPC.

  2. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  3. On the action bar, click the arrow next to Create and select Create a new default subnet.

You can view the VPC settings and modify them in the Information tab on the VPC page.

Creating a VPC#

To create a new VPC:

  1. In the top menu of the web interface, select the project and region where you want to create a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. Click Create on the action bar.

  5. In the window that opens, set the following parameters:

    • In the CIDR block field, enter a subnet IP address in CIDR notation (<network address>/<network prefix>). You can enter the CIDR block suggested by the cloud or set your own.

      Important

      From now on, all subnets in this VPC can only be created within the selected address range.

      Note

      CIDR prefix may have values from /16 to /28.

      The CIDR block of an existing VPC cannot be changed. Therefore, the address range should be selected with further scaling and connectivity to other networks in mind. On the one hand, the VPC must accommodate the required number of subnets, and, on the other hand, the selected range must not overlap with the address spaces of the networks in the connected infrastructure.

    • Connect to internet option. If it is selected, an Internet gateway will be created and attached to the VPC. A route through the gateway to the Internet (to 0.0.0.0./0) will also automatically be added to the main route table of this VPC.

  6. If you need to set a tag, click Add tag and specify the tag key and value. To assign more tags, click Add tag again.

  7. After setting all the required parameters, click Create.

The created VPC will be displayed in the resource table in the VPC subsection. You can view the VPC settings and change them in the Information tab on the VPC page.

Deleting VPC#

Important

To delete a VPC, first delete the instances, network interfaces, and VPN connections that were created in this VPC, and detach an Internet gateway and external networks if any.

  1. In the top menu of the web interface, select the project and region where you want to delete a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, select the VPC and click Delete on the pop-up action bar.

  5. In the window that opens, confirm the deletion.

Alternatively, you can delete a VPC on its page. To do this, in the Information tab, click Delete and confirm the action.

Additional VPC settings#

Associate DHCP options#

Along with a VPC, a distributed DHCP server is created with a set of default DHCP options. If you need, for example, to specify your own DNS or NTP server, you can specify extra DHCP options in addition to the service ones. How to do this is described in detail in DHCP documentation.

To apply a pre-created DHCP option set:

  1. In the top menu of the web interface, select the project and region where you want to associate DHCP options with the VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. Select the VPC from the resource table and click Associate DHCP options.

  5. In the window that opens, select the desired DHCP options set from the list and press :bdg-primary`Associate`.

Alternatively, you can go to the VPC page and edit DHCP Options in the Information tab. To do this, select the required option set from the drop-down list.

Reset DHCP options#

  1. In the top menu of the web interface, select the project and region where you want to reset the DHCP options for a VPC to their default values.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, select the VPC and click Reset DHCP options on the pop-up action bar.

  5. In the window that opens, confirm the action by clicking Reset.

Alternatively, you can go to the VPC page and edit DHCP Options in the Information tab. To do this, select the default set from the drop-down list.

Enabling/disabling DNS support#

In K2 Cloud, each VPC has a DNS server enabled by default. It allows you to find the internal IP addresses of instances and IP addresses of external resources by their DNS names.

VPC’s DNS server is accessible at the first IP address of each subnet. For example, if a subnet address is 172.31.0.0/24, then the DNS server will handle requests at the IP address 172.31.0.1.

  1. In the top menu of the web interface, select the project and region where you want to enable or disable DNS support for a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, find the VPC for which the DNS support should be enabled or disabled and click on the VPC ID to go to its page.

  5. Move the DNS Support switch to the desired position in the Information tab.

Enable route propagation#

For dynamic routing over VPN connections, BGP is used. To allow instances in a VPC to use BGP-advertised routes, they must be added to a route table. This is done with the Route propagation feature.

To enable route propagation:

  1. In the top menu of the web interface, select the project and region where you want to enable route propagation for a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, find the VPC for which the route propagation should be enabled and click on the VPC ID to go to its page.

  5. Go to the Information tab and click next to the Route propagation field to enter the editing mode.

  6. Select the target route table where the routes will be installed from the drop-down list.

  7. Click to save the changes.

Disable route propagation#

To disable route propagation:

  1. In the top menu of the web interface, select the project and region where you want to disable route propagation for a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, find the VPC for which route propagation should be disabled and click on the VPC ID to go to its page.

  5. In the Information tab, click next to the Route propagation field to switch to the editing mode.

  6. Click to clear the input field and click to save your changes.

Customize tags#

To set, modify or delete tags for a VPC:

  1. In the top menu of the web interface, select the project and region where you want to set tags for a VPC.

  2. Expand the side menu by clicking .

  3. Go to Virtual machines Networking VPC. To quickly find the section, you can use the menu search.

  4. In the resource table, find the VPC for which the tags should be set and click on the VPC ID to go to its page.

  5. Open the Tags tab and click Edit to set tags.

  6. To add a tag, fill in Key and Value fields. To assign the next tag, click Add tag.

    To modify a tag, edit the required fields (Value and/or Key) of the respective tag.

    To delete a tag, click the icon next to the tag you no longer need.

  7. To complete editing, click Save changes.

Information about a VPC#

General information about VPCs can be viewed in the resource table in Virtual machines Networking VPC. To open a page with a particular VPC, click its ID in the resource table in the VPC subsection.

The Information tab displays the main VPC parameters:

  • VPC name (Name tag);

  • whether it is a default VPC (Yes/No);

  • state;

  • selected DHCP parameter set;

  • target route table, if route propagation is enabled;

  • CIDR — IP address of the subnet;

  • attached internet gateway;

  • DNS support option (toggle switch).

Here you can:

The Tags tab displays all tags assigned to the VPC. You can add new, modify existing, and delete no-longer-needed tags.