IP block file

This page describes the fields in an IP block file, which is used in the setup of GKE on VMware.

You use an IP block file to describe a set of machines and the network that the machines are on. Here are some examples of how you would use an IP block file:

  • List the hostnames and static IP addresses for the nodes in your admin cluster.

  • List the hostnames and static IP addresses for the nodes in a user cluster.

  • List the hostnames and static IP addresses for the VMs that run the bundled Seesaw load balancer for your admin cluster.

  • List the hostnames and static IP addresses for the VMs that run the bundled Seesaw load balancer for a user cluster.

Template

Filling in the fields in an IP block file

blocks

An array of objects, each of which describes a set of hosts.

blocks[i].netmask

String. The subnet mask for the set of hosts. For example:

blocks:
- netmask: "255.255.252.0"

blocks[i].gateway

String. The address of the default gateway for the set of hosts. For example:

blocks:
- netmask: "255.255.252.0"
  gateway: "172.16.23.254"

blocks[i].ips

An array of objects. Each object has an individual IP address or a CIDR block of IP addresses. If the object has an individual IP address, it can also have a hostname.

For example:

blocks:
- netmask: "255.255.252.0"
  gateway: "172.16.23.254"
  ips:
  - ip: 172.16.20.10
    hostname: admin-host1
  - ip: 172.16.20.11
    hostname: admin-host2
  - ip: 172.16.20.12/30

The preceding example specifies six IP addresses: two individual addresses and a CIDR block of four addresses.

If you set ip to a CIDR block, do not specify a value for hostname.

When you do not specify a value for hostname, GKE on VMware uses the VM's name from vSphere as the hostname.

Old fields

Previous versions of GKE on VMware used a hostconfig section in the IP block file:

hostconfig:
  dns: ""
  tod: ""
  otherdns:
  - ""
  ...
  othertod:
  - ""
  ...
  searchdomainsfordns:
  - ""
  ...

Do not provide a hostconfig section in your IP block file. Instead, fill in the network.hostConfig section of your admin cluster configuration file or user cluster configuration file.

If you fill in the network.hostConfig section of a cluster configuration file, GKE on VMware ignores the hostconfig sections of all IP block files associated with the cluster.

If you do not fill in the network.hostConfig section of a cluster configuration file, then for backward compatibility, GKE on VMware reads the hostconfig sections of the IP block files associated with the cluster.