Create a user cluster (quickstart)

This document shows how to create a user cluster for Google Distributed Cloud.

The instructions here are part of a quickstart. For full instructions on how to create a user cluster, see Creating a user cluster.

Before you begin

Create an admin cluster (quickstart)

Get an SSH connection to your admin workstation

Get an SSH connection to your admin workstation.

Your component access service account is activated on your admin workstation.

Do all the remaining steps in this topic on your admin workstation in the home directory.

Specify static IPs for your user cluster

To specify the static IP addresses that you want to use for your user cluster, create an IP block file named user-cluster-ipblock.yaml. For this exercise, you need to specify three IP addresses to be used by the user cluster.

Here is an example of an IP block file with three hosts:

blocks:
  - netmask: 255.255.252.0
    gateway: 172.16.23.254
    ips:
    - ip: 172.16.20.15
      hostname: user-host1
    - ip: 172.16.20.16
      hostname: user-host2
    - ip: 172.16.20.17
      hostname: user-host3

The ips field is an array of IP addresses and hostnames. These are the IP addresses and hostnames that Google Distributed Cloud will assign to your user cluster nodes.

In the IP block file, you also specify the addresses of the DNS servers, time servers, and default gateway that the user cluster nodes will use.

User cluster configuration file

When gkeadm created your admin workstation, it generated a configuration file named user-cluster.yaml. This configuration file is for creating your user cluster.

Fill in your user cluster configuration file

Several fields in your user cluster configuration file are already filled in with default values, generated values, or values that you provided when you created your admin workstation. You can leave those fields unchanged.

Fill in the following fields. For instructions on how to fill in the fields, see User cluster configuration file.

name: "Fill in"
network:
  hostConfig:
    dnsServers:
    - "Fill in"
    ntpServers:
    - "Fill in"
    searchDomainsForDNS:
    - "Fill in (optional)"
  ipMode:
    type: Fill in. Set to "static".
    ipBlockFilePath: "Fill in"
loadBalancer:
  vips:
    controlPlaneVIP: "Fill in"
    ingressVIP: "Fill in"
  seesaw:
    ipBlockFilePath: "Fill in"
    vrid: Fill in
    masterIP: "Fill in"

Validate the user cluster configuration file

Verify that the your user cluster configuration file is valid and can be used for cluster creation:

gkectl check-config --kubeconfig kubeconfig --config user-cluster.yaml

Create a load balancer for your user cluster

Create and configure the VM for your Seesaw load balancer:

gkectl create loadbalancer --kubeconfig kubeconfig --config user-cluster.yaml

Create the user cluster

Create the user cluster:

gkectl create cluster --kubeconfig kubeconfig --config user-cluster.yaml

Locate the user cluster kubeconfig file

The gkectl create cluster command creates a kubeconfig file named USER_CLUSTER_NAME-kubeconfig in the current directory. You will need this kubeconfig file later to interact with your user cluster.

Verify that your user cluster is running

Verify that your user cluster is running:

kubectl get nodes --kubeconfig USER_CLUSTER_KUBECONFIG

Replace USER_CLUSTER_KUBECONFIG with the path of your kubeconfig file.

The output shows the user cluster nodes. For example:

my-user-cluster-node-pool-69-d46d77885-7b7tx   Ready ...
my-user-cluster-node-pool-69-d46d77885-lsvzk   Ready ...
my-user-cluster-node-pool-69-d46d77885-sswjk   Ready ...

What's next