Before you begin
- Install
datumctland thecomputeplugin, and select a project. See Compute commands. - Your account needs the Compute Admin, Network Admin, and DNS Admin roles in the project.
Reach an Instance by name
1
Deploy a web server
Deploy an If this is the first deploy in the project, the command asks whether to create a network named
nginx workload named web to Dallas:default. Enter y. Then enter y to apply the plan.2
Deploy a client
Deploy a second workload named
client on the same network. It uses the same image, because the image includes nslookup and wget:3
Find the web server's name
Compute publishes each Instance at The output is similar to the following:If the output is empty, wait a few seconds and run the command again. The name appears once the Instance is ready.
<instance-name>.instances.datum.internal. Read the exact name from the Instance:4
Look up and connect by name
Open a shell in the client and look up the web server:The answer is the web server’s private IPv6 address. Note it for later. Now connect to it by name:The output is the
nginx welcome page.Give the web server your own name
To give the web server a name you choose, create a private zone of your own, attach it to the network, and add a record.1
Find the network's DNS context
Each network has one DNS context. To list them with the network each one belongs to, run:Note the
CONTEXT for the default network, such as dns-default-4f1c2a9e7b30.2
Create a zone, attach it, and add a record
Save the following as Apply it:
private-zone.yaml. Replace CONTEXT_NAME with the context from the previous step, and WEB_ADDRESS with the web server’s address from the lookup:3
Wait for the zone
Check that the association and record are accepted, and that the zone is programmed:Continue when both commands print
True and the zone’s PROGRAMMED column shows True. This usually takes less than a minute. If something stays False, see Troubleshooting.4
Connect by your name
default network.This record holds an address, so update it if Compute replaces the web server’s Instance. For names that follow an Instance, see Find services by name.