IP block file

This page describes the fields in an IP block file.

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 of which has an IP address and 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
    hostname: admin-host3

Example IP block file

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

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
      hostname: admin-host3
    - ip: 172.16.20.13
      hostname: admin-host4
    - ip: 172.16.20.14
      hostname: admin-host5

Old fields

Previous versions of GKE on-prem 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-prem 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-prem reads the hostconfig sections of the IP block files associated with the cluster.