Service [v1]
- Description
- Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
- Type
object
Specification
.spec
- Description
- ServiceSpec describes the attributes that a user creates on a service.
- Type
object
.spec.clusterIPs
- Description
- ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are "None", empty string (""), or a valid IP address. Setting this to "None" makes a "headless service" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value. This field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
- Type
array
.spec.clusterIPs[]
- Type
string
.spec.externalIPs
- Description
- externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
- Type
array
.spec.externalIPs[]
- Type
string
.spec.ipFamilies
- Description
- IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.
- Type
array
.spec.ipFamilies[]
- Type
string
.spec.loadBalancerSourceRanges
- Description
- 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. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/
- Type
array
.spec.loadBalancerSourceRanges[]
- Type
string
.spec.ports
- Description
- The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
- Type
array
.spec.ports[]
- Description
- ServicePort contains information on service's port.
- Type
object- Required
port
.spec.selector
- Description
- Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/
- Type
object
.spec.sessionAffinityConfig
- Description
- SessionAffinityConfig represents the configurations of session affinity.
- Type
object
.spec.sessionAffinityConfig.clientIP
- Description
- ClientIPConfig represents the configurations of Client IP based session affinity.
- Type
object
.status
- Description
- ServiceStatus represents the current status of a service.
- Type
object
.status.conditions
- Description
- Current service state
- Type
array
.status.conditions[]
- Description
- Condition contains details for one aspect of the current state of this API Resource.
- Type
object- Required
typestatuslastTransitionTimereasonmessage
.status.loadBalancer
- Description
- LoadBalancerStatus represents the status of a load-balancer.
- Type
object
.status.loadBalancer.ingress
- Description
- Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.
- Type
array
.status.loadBalancer.ingress[]
- Description
- LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
- Type
object
.status.loadBalancer.ingress[].ports
- Description
- Ports is a list of records of service ports If used, every port defined in the service should have an entry in it
- Type
array
.status.loadBalancer.ingress[].ports[]
- Description
- PortStatus represents the error condition of a service port
- Type
object- Required
portprotocol
API Endpoints
The following API endpoints are available:
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/servicesDELETE: delete collection of ServiceGET: list objects of kind ServicePOST: create a new Service
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/services/{name}DELETE: delete the specified ServiceGET: read the specified ServicePATCH: partially update the specified ServicePUT: replace the specified Service
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/services/{name}/statusGET: read status of the specified ServicePATCH: partially update status of the specified ServicePUT: replace status of the specified Service
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/services
- HTTP method
DELETE- Description
- delete collection of Service
- HTTP responses
- HTTP method
GET- Description
- list objects of kind Service
- HTTP responses
- HTTP method
POST- Description
- create a new Service
- Query parameters
- Body parameters
- HTTP responses
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/services/{name}
- HTTP method
DELETE- Description
- delete the specified Service
- Query parameters
- HTTP responses
- HTTP method
GET- Description
- read the specified Service
- HTTP responses
- HTTP method
PATCH- Description
- partially update the specified Service
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace the specified Service
- Query parameters
- Body parameters
- HTTP responses
/kubernetes/{cluster}/api/v1/namespaces/{namespace}/services/{name}/status
- HTTP method
GET- Description
- read status of the specified Service
- HTTP responses
- HTTP method
PATCH- Description
- partially update status of the specified Service
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace status of the specified Service
- Query parameters
- Body parameters
- HTTP responses