Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Starting with MOSK 25.2, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
Subnet¶
This section describes the Subnet resource used in the management API to
allocate IP addresses for cluster nodes.
For demonstration purposes, we split the Subnet custom resource (CR) into
the following major sections:
Subnet metadata¶
The Subnet CR metadata contains the following fields:
apiVersionAPI version of the object that is
ipam.mirantis.com/v1alpha1.
kindObject type that is
Subnet
metadataThis field contains the following subfields:
nameName of the
Subnetobject.
namespaceProject in which the
Subnetobject was created.
labelsKey-value pairs that are attached to the object:
ipam/DefaultSubnet: "1"Deprecated since MCC 2.14.0 (5.21.0)Indicates that this subnet was automatically created for the PXE network.
ipam/UIDUnique ID of a subnet.
kaas.mirantis.com/providerProvider type.
kaas.mirantis.com/regionRegion name.
Note
The
kaas.mirantis.com/regionlabel is removed from all MOSK objects in 24.1. Therefore, do not add the label starting with this release. On existing clusters updated to this release, or if added manually, MOSK ignores this label.
Warning
Labels and annotations that are not documented in this API Reference are generated automatically. Do not modify them using the API.
Configuration example:
apiVersion: ipam.mirantis.com/v1alpha1
kind: Subnet
metadata:
name: kaas-mgmt
namespace: default
labels:
ipam/UID: 1bae269c-c507-4404-b534-2c135edaebf5
kaas.mirantis.com/provider: baremetal
Subnet spec¶
The spec field of the Subnet resource describes the desired state of
a subnet. It contains the following fields:
cidrA valid IPv4 CIDR, for example,
10.11.0.0/24.
gatewayA valid gateway address, for example,
10.11.0.9.
includeRangesA comma-separated list of IP address ranges within the given CIDR that should be used in the allocation of IPs for nodes. The gateway, network, broadcast, and DNSaddresses will be excluded (protected) automatically if they intersect with one of the range. The IPs outside the given ranges will not be used in the allocation. Each element of the list can be either an interval
10.11.0.5-10.11.0.70or a single address10.11.0.77.Warning
Do not use values that are out of the given CIDR.
excludeRangesA comma-separated list of IP address ranges within the given CIDR that should not be used in the allocation of IPs for nodes. The IPs within the given CIDR but outside the given ranges will be used in the allocation. The gateway, network, broadcast, and DNS addresses will be excluded (protected) automatically if they are included in the CIDR. Each element of the list can be either an interval
10.11.0.5-10.11.0.70or a single address10.11.0.77.Warning
Do not use values that are out of the given CIDR.
useWholeCidrIf set to
false(by default), the subnet address and broadcast address will be excluded from the address allocation. If set totrue, the subnet address and the broadcast address are included into the address allocation for nodes.
nameserversThe list of IP addresses of name servers. Each element of the list is a single address, for example,
172.18.176.6.
Configuration example:
spec:
cidr: 172.16.48.0/24
excludeRanges:
- 172.16.48.99
- 172.16.48.101-172.16.48.145
gateway: 172.16.48.1
nameservers:
- 172.18.176.6
Subnet status¶
The status field of the Subnet resource describes the actual state of
a subnet. It contains the following fields:
allocatableThe number of IP addresses that are available for allocation.
allocatedIPsThe list of allocated IP addresses in the
IP:<IPAddr object UID>format.
capacityThe total number of IP addresses to be allocated, including the sum of allocatable and already allocated IP addresses.
cidrThe IPv4 CIDR for a subnet.
gatewayThe gateway address for a subnet.
nameserversThe list of IP addresses of name servers.
rangesThe list of IP address ranges within the given CIDR that are used in the allocation of IPs for nodes.
statusMessageDeprecated since Container Cloud 2.23.0 (Cluster release 11.7.0) and will be removed in one of the following releases in favor of
stateandmessages. Since Container Cloud 2.24.0 (Cluster release 14.0.0), this field is not set for subnets of newly created clusters. For the field description, seestate.
stateSince MCC 2.23.0 (11.7.0)Message that reflects the current status of the resource. The list of possible values includes the following:
OK- object is operational.ERR- object is non-operational. This status has a detailed description in themessageslist.TERM- object was deleted and is terminating.
messagesSince MCC 2.23.0 (11.7.0)List of error or warning messages if the object state is
ERR.
objCreatedDate, time, and IPAM version of the resource creation.
objStatusUpdatedDate, time, and IPAM version of the last update of the
statusfield in the resource.
objUpdatedDate, time, and IPAM version of the last resource update.
Configuration example:
status:
allocatable: 51
allocatedIPs:
- 172.16.48.200:24e94698-f726-11ea-a717-0242c0a85b02
- 172.16.48.201:2bb62373-f726-11ea-a717-0242c0a85b02
- 172.16.48.202:37806659-f726-11ea-a717-0242c0a85b02
capacity: 54
cidr: 172.16.48.0/24
gateway: 172.16.48.1
nameservers:
- 172.18.176.6
ranges:
- 172.16.48.200-172.16.48.253
objCreated: 2021-10-21T19:09:32Z by v5.1.0-20210930-121522-f5b2af8
objStatusUpdated: 2021-10-21T19:14:18.748114886Z by v5.1.0-20210930-121522-f5b2af8
objUpdated: 2021-10-21T19:09:32.606968024Z by v5.1.0-20210930-121522-f5b2af8
state: OK