Skip to content
Docs Try Aspire

ServiceSpecV1

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Defines the specification for a Kubernetes Service resource.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class ServiceSpecV1
{
// ...
}
This class represents various attributes that define the behavior and configuration of a Kubernetes Service, such as type, IP addresses, load balancer settings, traffic policies, selectors, ports, and session affinity options.
View all constructors
AllocateLoadBalancerNodePortsget; set
bool?
Indicates whether node ports should be automatically allocated for a service of type LoadBalancer.
ClusterIpget; set
string?
Specifies the IP address assigned to the Kubernetes Service within the cluster.
ClusterIPsget
List<string>
Represents a list of cluster IP addresses assigned to the Kubernetes Service.
ExternalIPsget
List<string>
Represents a list of external IP addresses associated with the service.
ExternalNameget; set
string?
Specifies the external DNS name for the Kubernetes Service associated with a ServiceSpecV1.
ExternalTrafficPolicyget; set
string?
Specifies how external traffic is routed to the Service's underlying network endpoints.
HealthCheckNodePortget; set
int?
Gets or sets the health check node port for the Kubernetes Service.
InternalTrafficPolicyget; set
string?
Gets or sets the internal traffic policy for the Kubernetes Service.
IpFamiliesget
List<string>
A list of IP families (e.g., IPv4, IPv6) used by the Kubernetes Service.
IpFamilyPolicyget; set
string?
Defines the IP family policy for a Kubernetes Service in API version V1.
LoadBalancerClassget; set
string?
Specifies the class of the load balancer to be used for the service.
LoadBalancerIpget; set
string?
Gets or sets the IP address to assign to the external LoadBalancer of the Service.
LoadBalancerSourceRangesget
List<string>
Specifies a list of IP address ranges that are allowed to access the Kubernetes Service when the Service type is "LoadBalancer".
Portsget
Represents the collection of port configurations for a Kubernetes Service.
PublishNotReadyAddressesget; set
bool?
Gets or sets a value indicating whether to publish the addresses of not-ready pods for a Kubernetes Service.
Selectorget; set
Dictionary<string, string>
Represents the selector field in the Kubernetes Service specification.
SessionAffinityget; set
string?
Defines the session affinity setting for a Kubernetes Service in API version V1.
SessionAffinityConfigget; set
Represents the session affinity configuration for a Kubernetes Service.
TrafficDistributionget; set
string?
Specifies the traffic distribution policy for the Kubernetes Service.
Typeget; set
string
Gets or sets the type of the Kubernetes Service.
View all properties