Deploy a VM workload

You can create, deploy, and connect to your test virtual machines (VM) workloads in GDC Sandbox (GDC Sandbox). To create and start a test VM workload, follow the steps in Create and start a VM.

To view a list of images GDC Sandbox provides, run:

kubectl --kubeconfig KUBECONFIG get
virtualmachineimage.virtualmachine.gdc.goog -n gpc-system

Replace KUBECONFIG with the path of your kubeconfig file for the Management API server.

Connect to a VM

  1. Follow the steps in Connect to a VM to:

    1. Create an SSH key pair and a username.
    2. Upload your key to the VM and create a Kubernetes resource (VirtualMachineAccessRequest) with your public key, username, and time to live (TTL) value for the key.
  2. Initiate a secure tunnel. If you have a running instance of sshuttle as described in Connect to your instance, terminate that process.

          sshuttle -r zone1-org-1-data@GDC_SANDBOX_INSTANCE_NAME --no-latency-control \
          --ssh-cmd 'gcloud compute ssh --project PROJECT_NAME --zone ZONE --tunnel-through-iap' \
          10.200.0.0/16 --dns
    

    Replace the following with the values provided to you by the GDC Sandbox team:

    • GDC_SANDBOX_INSTANCE_NAME: the name of your GDC Sandbox instance.
    • PROJECT_NAME: the name of your project.
    • ZONE: the zone containing your GDC Sandbox environment.
  3. While the command is running, run the ssh command to the VM instance in another terminal

        ssh -i PATH_TO_PRIVATE_KEY USERNAME@EXTERNAL_IP
    

    Replace the following values:

    • PATH_TO_PRIVATE_KEY with the path to the private SSH key file that corresponds to the public key you added to the VM.
    • USERNAME with the username that you specified when you created the SSH key. For example, cloudysanfrancisco_example_com or cloudysanfrancisco.
    • EXTERNAL_IP with the external ingress IP address of the VM.