How to do it...

We'll create a web server whose public web traffic (data) will be served by the beta-data network and the SSH into the web server would be via the alpha-mgmt network:

  1. Firstly, we'll set up some firewall rules to the alpha and beta networks. In the alpha-mgmt network, open the SSH port 22 to all servers with the network tag alpha-server:
gcloud compute --project=<project id> firewall-rules createallow-ssh-alpha-servers --description="Allow ssh access to all servers with network tag alpha-server" --direction=INGRESS --priority=1000 --network=alpha-mgmt--action=ALLOW --rules=tcp:22 --source-ranges=

The created rule on the Console will be similar to the following screenshot:

  1. In the beta network, ...

Get Google Cloud Platform Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.