ClusterUserDefinedNetwork describe network request for a shared network across namespaces.
ClusterUserDefinedNetwork describe network request for a shared network across namespaces.
object
spec
Property | Type | Description |
---|---|---|
|
|
apiVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
|
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
|
|
|
ClusterUserDefinedNetworkSpec defines the desired state of ClusterUserDefinedNetwork. |
|
|
ClusterUserDefinedNetworkStatus contains the observed status of the ClusterUserDefinedNetwork. |
ClusterUserDefinedNetworkSpec defines the desired state of ClusterUserDefinedNetwork.
object
namespaceSelector
network
Property | Type | Description |
---|---|---|
|
|
NamespaceSelector Label selector for which namespace network should be available for. |
|
|
Network is the user-defined-network spec |
NamespaceSelector Label selector for which namespace network should be available for.
object
Property | Type | Description |
---|---|---|
|
|
matchExpressions is a list of label selector requirements. The requirements are ANDed. |
|
|
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
|
|
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
matchExpressions is a list of label selector requirements. The requirements are ANDed.
array
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
object
key
operator
Property | Type | Description |
---|---|---|
|
|
key is the label key that the selector applies to. |
|
|
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
|
|
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
Network is the user-defined-network spec
object
topology
Property | Type | Description |
---|---|---|
|
|
Layer2 is the Layer2 topology configuration. |
|
|
Layer3 is the Layer3 topology configuration. |
|
|
Localnet is the Localnet topology configuration. |
|
|
Topology describes network configuration. Allowed values are "Layer3", "Layer2" and "Localnet". Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets. Layer2 topology creates one logical switch shared by all nodes. Localnet topology is based on layer 2 topology, but also allows connecting to an existent (configured) physical network to provide north-south traffic to the workloads. |
Layer2 is the Layer2 topology configuration.
object
role
Property | Type | Description |
---|---|---|
|
|
IPAM section contains IPAM-related configuration for the network. |
|
|
JoinSubnets are used inside the OVN network topology. Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. This field is only allowed for "Primary" network. It is not recommended to set this field without explicit need and understanding of the OVN network topology. When omitted, the platform will choose a reasonable default which is subject to change over time. |
|
|
MTU is the maximum transmission unit for a network. MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network. |
|
|
Role describes the network role in the pod. Allowed value is "Secondary".
Secondary network is only assigned to pods that use |
|
|
Subnets are used for the pod network across the cluster. Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. The format should match standard CIDR notation (for example, "10.128.0.0/16").
This field must be omitted if |
IPAM section contains IPAM-related configuration for the network.
object
Property | Type | Description |
---|---|---|
|
|
Lifecycle controls IP addresses management lifecycle. The only allowed value is Persistent. When set, the IP addresses assigned by OVN Kubernetes will be persisted in an
|
|
|
Mode controls how much of the IP configuration will be managed by OVN.
|
Layer3 is the Layer3 topology configuration.
object
role
subnets
Property | Type | Description |
---|---|---|
|
|
JoinSubnets are used inside the OVN network topology. Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. This field is only allowed for "Primary" network. It is not recommended to set this field without explicit need and understanding of the OVN network topology. When omitted, the platform will choose a reasonable default which is subject to change over time. |
|
|
MTU is the maximum transmission unit for a network. MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network. |
|
|
Role describes the network role in the pod. Allowed values are "Primary" and "Secondary".
Primary network is automatically assigned to every pod created in the same namespace.
Secondary network is only assigned to pods that use |
|
|
Subnets are used for the pod network across the cluster. Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. Given subnet is split into smaller subnets for every node. |
|
|
Subnets are used for the pod network across the cluster.
Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. Given subnet is split into smaller subnets for every node.
array
object
cidr
Property | Type | Description |
---|---|---|
|
|
CIDR specifies L3Subnet, which is split into smaller subnets for every node. |
|
|
HostSubnet specifies the subnet size for every node. When not set, it will be assigned automatically. |
Localnet is the Localnet topology configuration.
object
physicalNetworkName
role
Property | Type | Description |
---|---|---|
|
|
excludeSubnets is a list of CIDRs to be removed from the specified CIDRs in |
|
|
ipam configurations for the network.
ipam is optional. When omitted, |
|
|
mtu is the maximum transmission unit for a network.
mtu is optional. When omitted, the configured value in OVN-Kubernetes (defaults to 1500 for localnet topology)
is used for the network.
Minimum value for IPv4 subnet is 576, and for IPv6 subnet is 1280.
Maximum value is 65536.
In a scenario |
|
|
physicalNetworkName points to the OVS bridge-mapping’s network-name configured in the nodes, required.
Min length is 1, max length is 253, cannot contain |
|
|
role describes the network role in the pod, required.
Controls whether the pod interface will act as primary or secondary.
Localnet topology supports |
|
|
subnets is a list of subnets used for pods in this localnet network across the cluster.
The list may be either 1 IPv4 subnet, 1 IPv6 subnet, or 1 of each IP family.
When set, OVN-Kubernetes assigns an IP address from the specified CIDRs to the connected pod,
eliminating the need for manual IP assignment or reliance on an external IPAM service (e.g., a DHCP server).
subnets is optional. When omitted OVN-Kubernetes won’t assign IP address automatically.
Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.
The format should match standard CIDR notation (for example, "10.128.0.0/16").
This field must be omitted if |
|
|
vlan configuration for the network.
vlan.mode is the VLAN mode.
When "Access" is set, OVN-Kubernetes configures the network logical switch port in access mode.
vlan.access is the access VLAN configuration.
vlan.access.id is the VLAN ID (VID) to be set on the network logical switch port.
vlan is optional, when omitted the underlying network default VLAN will be used (usually |
ipam configurations for the network.
ipam is optional. When omitted, subnets
must be specified.
When ipam.mode
is Disabled
, subnets
must be omitted.
ipam.mode
controls how much of the IP configuration will be managed by OVN.
When Enabled
, OVN-Kubernetes will apply IP configuration to the SDN infra and assign IPs from the selected
subnet to the pods.
When Disabled
, OVN-Kubernetes only assigns MAC addresses, and provides layer2 communication, and enables users
to configure IP addresses on the pods.
ipam.lifecycle
controls IP addresses management lifecycle.
When set to 'Persistent', the assigned IP addresses will be persisted in ipamclaims.k8s.cni.cncf.io
object.
Useful for VMs, IP address will be persistent after restarts and migrations. Supported when ipam.mode
is Enabled
.
object
Property | Type | Description |
---|---|---|
|
|
Lifecycle controls IP addresses management lifecycle. The only allowed value is Persistent. When set, the IP addresses assigned by OVN Kubernetes will be persisted in an
|
|
|
Mode controls how much of the IP configuration will be managed by OVN.
|
vlan configuration for the network.
vlan.mode is the VLAN mode.
When "Access" is set, OVN-Kubernetes configures the network logical switch port in access mode.
vlan.access is the access VLAN configuration.
vlan.access.id is the VLAN ID (VID) to be set on the network logical switch port.
vlan is optional, when omitted the underlying network default VLAN will be used (usually 1
).
When set, OVN-Kubernetes will apply VLAN configuration to the SDN infra and to the connected pods.
object
mode
Property | Type | Description |
---|---|---|
|
|
Access is the access VLAN configuration |
|
|
mode describe the network VLAN mode. Allowed value is "Access". Access sets the network logical switch port in access mode, according to the config. |
Access is the access VLAN configuration
object
id
Property | Type | Description |
---|---|---|
|
|
id is the VLAN ID (VID) to be set for the network. id should be higher than 0 and lower than 4095. |
ClusterUserDefinedNetworkStatus contains the observed status of the ClusterUserDefinedNetwork.
object
Property | Type | Description |
---|---|---|
|
|
Conditions slice of condition objects indicating details about ClusterUserDefineNetwork status. |
|
|
Condition contains details for one aspect of the current state of this api Resource. |
Conditions slice of condition objects indicating details about ClusterUserDefineNetwork status.
array
Condition contains details for one aspect of the current state of this api Resource.
object
lastTransitionTime
message
reason
status
type
Property | Type | Description |
---|---|---|
|
|
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the api field changed is acceptable. |
|
|
message is a human readable message indicating details about the transition. This may be an empty string. |
|
|
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. |
|
|
reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed api. The value should be a CamelCase string. This field may not be empty. |
|
|
status of the condition, one of True, False, Unknown. |
|
|
type of condition in CamelCase or in foo.example.com/CamelCase. |
The following api endpoints are available:
/apis/k8s.ovn.org/v1/clusteruserdefinednetworks
DELETE
: delete collection of ClusterUserDefinedNetwork
GET
: list objects of kind ClusterUserDefinedNetwork
POST
: create a ClusterUserDefinedNetwork
/apis/k8s.ovn.org/v1/clusteruserdefinednetworks/{name}
DELETE
: delete a ClusterUserDefinedNetwork
GET
: read the specified ClusterUserDefinedNetwork
PATCH
: partially update the specified ClusterUserDefinedNetwork
PUT
: replace the specified ClusterUserDefinedNetwork
/apis/k8s.ovn.org/v1/clusteruserdefinednetworks/{name}/status
GET
: read status of the specified ClusterUserDefinedNetwork
PATCH
: partially update status of the specified ClusterUserDefinedNetwork
PUT
: replace status of the specified ClusterUserDefinedNetwork
DELETE
delete collection of ClusterUserDefinedNetwork
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
GET
list objects of kind ClusterUserDefinedNetwork
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
POST
create a ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized |
Empty |
Parameter | Type | Description |
---|---|---|
|
|
name of the ClusterUserDefinedNetwork |
DELETE
delete a ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
HTTP code | Reponse body |
---|---|
200 - OK |
|
202 - Accepted |
|
401 - Unauthorized |
Empty |
GET
read the specified ClusterUserDefinedNetwork
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
PATCH
partially update the specified ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
PUT
replace the specified ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized |
Empty |
Parameter | Type | Description |
---|---|---|
|
|
name of the ClusterUserDefinedNetwork |
GET
read status of the specified ClusterUserDefinedNetwork
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
PATCH
partially update status of the specified ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized |
Empty |
PUT
replace status of the specified ClusterUserDefinedNetwork
Parameter | Type | Description |
---|---|---|
|
|
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized |
Empty |