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.
Getting started
- Log in or sign up to the management console
. If not signed up yet, navigate to the management console and follow the instructions. - Go to Yandex Cloud Billing
and make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not yet have a billing account, create one. - If you do not have a folder yet, create one. While creating a folder, you can also 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 name for the network, e.g.,
test-network
. - Click Create network.
Create a subnet
Create a subnet where cloud resources will be assigned internal IP addresses:
- Click the name of the cloud network you created.
- Click
Create subnet. - Enter a name for the subnet, e.g.,
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 the Virtual Private Cloud pricing policy.
To reserve an IP address:
- In the list of services, select Virtual Private Cloud.
- Go to IP addresses.
- Click Reserve address.
- In the window that opens, select the availability zone where you created the subnet in the previous step.
- Select the DDoS protection option if you want to protect your cloud resources from DDoS attacks.
- 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.