apiVersion: networking.k8s.io/v1
import "k8s.io/api/networking/v1"
ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.
apiVersion: networking.k8s.io/v1
kind: ServiceCIDR
metadata (ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (ServiceCIDRSpec)
spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (ServiceCIDRStatus)
status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
cidrs ([]string)
Atomic: will be replaced during a merge
CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.
ServiceCIDRStatus describes the current state of the ServiceCIDR.
conditions ([]Condition)
Patch strategy: merge on key type
Map: unique values on key type will be kept during a merge
conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state
Condition contains details for one aspect of the current state of this API Resource.
conditions.lastTransitionTime (Time), required
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.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
conditions.message (string), required
message is a human readable message indicating details about the transition. This may be an empty string.
conditions.reason (string), required
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.
conditions.status (string), required
status of the condition, one of True, False, Unknown.
conditions.type (string), required
type of condition in CamelCase or in foo.example.com/CamelCase.
conditions.observedGeneration (int64)
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.
ServiceCIDRList contains a list of ServiceCIDR objects.
apiVersion: networking.k8s.io/v1
kind: ServiceCIDRList
metadata (ListMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]ServiceCIDR), required
items is the list of ServiceCIDRs.
© 2025 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
Copyright © 2025 The Linux Foundation ®. All rights reserved.
https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/service-cidr-v1/