⎈ k8s knowledge compiler

Service [page]deterministic

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.

referencenetworking

`apiVersion: v1`

`import "k8s.io/api/core/v1"`

## Service {#Service}

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.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</td> </tr> <tr> <td><code>spec</code><br/><em><a href="">ServiceSpec</a></em></td> <td>Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status</td> </tr> <tr> <td><code>status</code><br/><em><a href="">ServiceStatus</a></em></td> <td>Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status</td> </tr> </tbody> </table>

## ServiceSpec {#ServiceSpec}

ServiceSpec describes the attributes that a user creates on a service.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>allocateLoadBalancerNodePorts</code><br/><em>boolean</em></td> <td>allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is "true". It may be set to "false" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.</td> </tr> <tr> <td><code>clusterIP</code><br/><em>string</em></td> <td>clusterIP is the IP address of the service and is 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 blank) 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. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</td> </tr> <tr> <td><code>clusterIPs</code><br/><em>string array</em>< …(trimmed)

Sources

reference/kubernetes-api/core/service-v1.md · docService

Related (25)

part_of Service {#Service}describes conf=1
part_of ServiceSpec {#ServiceSpec}describes conf=1
part_of ServiceStatus {#ServiceStatus}describes conf=1
part_of ServiceList {#ServiceList}describes conf=1
part_of ClientIPConfig {#ClientIPConfig}describes conf=1
part_of LoadBalancerIngress {#LoadBalancerIngress}describes conf=1
part_of LoadBalancerStatus {#LoadBalancerStatus}describes conf=1
part_of PortStatus {#PortStatus}describes conf=1
part_of ServicePort {#ServicePort}describes conf=1
part_of Operations {#Operations}describes conf=1
part_of `post` Createdescribes conf=1
part_of `patch` Patchdescribes conf=1
part_of `put` Replacedescribes conf=1
part_of `delete` Deletedescribes conf=1
part_of `delete` Delete Collectiondescribes conf=1
part_of `get` Readdescribes conf=1
part_of `get` Listdescribes conf=1
part_of `get` List All Namespacesdescribes conf=1
part_of `get` Watchdescribes conf=1
part_of `get` Watch Listdescribes conf=1
part_of `get` Watch List All Namespacesdescribes conf=1
part_of `patch` Patch Statusdescribes conf=1
part_of `get` Read Statusdescribes conf=1
part_of `put` Replace Statusdescribes conf=1

← all Docs