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[] | externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. |
| externalName | string | externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service.No proxying will be involved.Must be a valid RFC - 1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName. |
| externalTrafficPolicy | string | externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. |
| healthCheckNodePort | number | healthCheckNodePort 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 will be restricted to the specified client IPs. |
| ports | ServicePort[] | The list of ports that are exposed by this service. |
| publishNotReadyAddresses | boolean | publishNotReadyAddresses, 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 | type determines how the Service is exposed. |