Galactic VPC is in preview, and the
networking.datumapis.com/v1alpha API can change.Before you begin
- Install
datumctl, log in, and select a project. For more information, see the datumctl quickstart. - To create, change, or delete networks, you need the Network Admin role in the project. The same role lets you attach workloads to a network. For more information, see Permissions.
Create a network
To create a network, follow these steps:-
Save the following manifest as
network.yaml:spec.ipam.mode: Autotells Datum to assign the network’s address space.ipam.modeis the only field that you need to set. -
To create the network, run the following command:
-
To check that the network is ready, run the following command:
When the network is ready, the
IPV6PREFIXcolumn shows the private IPv6 prefix that Datum assigned, and theREADYcolumn showsTrue.
spec.ipFamilies defaults to [IPv6], and spec.mtu defaults to 1440. Keep the defaults unless you have a reason to change them. Datum rejects a network that doesn’t include IPv6, and a larger MTU can cause connections between locations to stall.
Attach a workload to a network
A workload chooses its network when you create it. You can’t move a workload to a different network later. To attach a workload withdatumctl, pass --network when you create it:
WORKLOAD_NAME: a name for your workload.IMAGE: the full image reference, including the registry host.LOCATION: one or more locations, separated by commas.NETWORK_NAME: the name of the network, such asbackend.
--network, the command attaches the workload to the default network. For more information, see The default network.
To attach a workload in a manifest, set network.name in the workload’s only entry under spec.template.spec.networkInterfaces. The following workload runs in Dallas and Ashburn on the backend network:
NetworkNotFound and no Instances start. If you don’t have permission to use the network, Datum rejects the workload with permission to use the network was denied.
Keep addresses after scale-down
By default, an Instance keeps its address when Datum replaces it during a rollout or restart, but Datum releases the address when it removes the Instance, such as when you scale down or delete the workload. To keep addresses reserved even after scale-down, setreclaimPolicy: Retain on the network interface when you create the workload:
reclaimPolicy after you create the workload.
Delete a network
Before you delete a network, delete the workloads that are attached to it. To delete a network, run the following command:NETWORK_NAME with the name of the network.
If Instances still hold addresses on the network, the network stays in deletion and reports RangeOccupied until they’re gone.
Permissions
Networks use the following roles and permissions:What’s next
- To learn how Instances get addresses and which traffic a network carries, see Network addressing and traffic.
- To review what networks can’t do, see Networking limitations and roadmap.
- To serve a workload publicly through Datum’s ALB, see Publish a workload.