Getting started with VPC
Create a cloud network and subnet in an empty cloud and reserve a static public IP address for your VM using Virtual Private Cloud. Your cloud resources will be connected to the subnet and the static public IP address will remain reserved even if you stop or delete the VM it was attached to. This address can later be assigned to another VM.
Note
You can automatically create a cloud network and subnets in all availability zones when creating a folder or creating a VM.
Before you start
- Log in to or register in the management console. If you aren't registered, go to the management console and follow the instructions.
- On the billing page, make sure you linked a billing account and it has the
ACTIVE
orTRIAL_ACTIVE
status. If you don't have a billing account, create one. - If you don't have a folder yet, create one. When creating a folder, you can create a default virtual network with subnets in all availability zones.
Create a cloud network
To create a cloud network:
- In the management console, select a folder to create your cloud network in.
- In the list of services, select Virtual Private Cloud.
- Click Create network.
- Enter a network name, like
test-network
. - Click Create network.
Create a subnet
Create a subnet where cloud resources will be assigned internal IP addresses:
- Click on the name of the cloud network created.
- Click Add subnet.
- Enter a subnet name, like
test-subnet-1
. - Select an availability zone from the drop-down list. Any zone from the list will be fine for the first subnet.
- Enter the subnet CIDR: its IP address and mask (for example,
10.10.0.0/24
). For more information about subnet IP address ranges, see Cloud networks and subnets. - Click Create subnet.
Reserve a static public IP address
Reserve a static public IP address for your VM. You can assign this address to any VM and it won't change when the VM is stopped.
Warning
You're charged for the reserved static public IP address even if it's not assigned to any VM. For more information, see Pricing policy for Virtual Private Cloud.
To reserve an IP address:
- In the list of services, select Virtual Private Cloud.
- Go to IP addresses.
- Click Reserve address.
- Select the availability zone where you created the subnet in the previous step.
- Select DDoS protection if you want to safeguard your cloud resources from DDoS attacks.
- In the window that opens, click Reserve.
Delete a subnet and static public IP address
If you no longer need a subnet, delete it.
If the reserved address isn't assigned to any resource, you can delete it.
What's next
Create a new VM, connect it to a subnet, and assign it a reserved public IP address.