This section describes the SubnetPool resource used in Mirantis Container Cloud API to manage a pool of addresses from which subnets can be allocated.

For demonstration purposes, the Container Cloud SubnetPool custom resource (CR) is split into the following major sections:

SubnetPool metadata

The Container Cloud SubnetPool CR contains the following fields:

  • apiVersion

    API version of the object that is

  • kind

    Object type that is SubnetPool.

  • metadata

    The metadata field contains the following subfields:

    • name

      Name of the SubnetPool object.

    • namespace

      Project in which the SubnetPool object was created.

    • labels

      Key-value pairs that are attached to the object:


        Provider type that is baremetal.


        Region name.

Configuration example:

kind: SubnetPool
  name: kaas-mgmt
  namespace: default
  labels: baremetal region-one

SubnetPool spec

The spec field of the SubnetPool resource describes the desired state of a subnet pool. It contains the following fields:

  • cidr

    Valid IPv4 CIDR. For example,

  • blockSize

    IP address block size to use when assigning an IP address block to every new child Subnet object. For example, if you set /25, every new child Subnet will have 128 IPs to allocate. Possible values are from /29 to the cidr size. Immutable.

  • nameservers

    Optional. List of IP addresses of name servers to use for every new child Subnet object. Each element of the list is a single address, for example, Default: empty.

  • gatewayPolicy

    Optional. Method of assigning a gateway address to new child Subnet objects. Default: none. Possible values are:

    • first - first IP of the IP address block assigned to a child Subnet, for example,

    • last - last IP of the IP address block assigned to a child Subnet, for example,

    • none - no gateway address.

Configuration example:

  blockSize: /25
  gatewayPolicy: first

SubnetPool status

The status field of the SubnetPool resource describes the actual state of a subnet pool. It contains the following fields:

  • statusMessage

    Message that reflects the current status of the SubnetPool resource. Possible values are:

    • OK - a subnet pool is active.

    • ERR: <error message> - a subnet pool is in the Failure state.

    • TERM - a subnet pool is terminating.

  • allocatedSubnets

    List of allocated subnets. Each subnet has the <CIDR>:<SUBNET_UID> format.

  • blockSize

    Block size to use for IP address assignments from the defined pool.

  • capacity

    Total number of IP addresses to be allocated. Includes the number of allocatable and already allocated IP addresses.

  • allocatable

    Number of subnets with the blockSize size that are available for allocation.

  • lastUpdate

    Date and time of the last SubnetPool status update.

  • versionIpam

    IPAM version used during the last object update.


  blockSize: /24
  capacity: 54
  allocatable: 51
  lastUpdate: "2020-09-15T08:30:08Z"
  versionIpam: v3.0.999-20200807-130909-44151f8
  statusMessage: OK