Cloud API Overview > @adpt/cloud > k8s > ServiceSpec
k8s.ServiceSpec interface
Signature:
export interface ServiceSpec
Properties
| Property | Type | Description |
|---|---|---|
| clusterIP | string | Cluster IP for a k8s.Service() |
| externalIPs | string[] | A list of IP addresses for which nodes in the cluster will also accept traffic for this service. |
| externalName | string | The external reference that kubedns or equivalent will return as a CNAME record for this service. |
| externalTrafficPolicy | string | Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. |
| healthCheckNodePort | number | Specifies the healthcheck nodePort for the service. |
| loadBalancerIP | string | Only applies to Service Type: LoadBalancer. LoadBalancer will get created with the IP specified in this field. |
| loadBalancerSourceRanges | string[] | If specified and supported by the platform, this will restrict traffic through the cloud provider load balancer to the specified client IPs. |
| ports | ServicePort[] | The list of ports that are exposed by this service. |
| publishNotReadyAddresses | boolean | When set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. |
| selector | object | Route service traffic to pods with label keys and values matching this selector. |
| sessionAffinity | string | Used to maintain session affinity. |
| type | string | Determines how the Service is exposed. |