GSaha567/seq_level_training_data
052
1text,length,is_long_context,metric_val,label_metric2"= v1.Service3{product-author}4{product-version}5:data-uri:6:icons:7:toc: macro8:toc-title:9:toclevels: 210 11toc::[]12 13== Description14[%hardbreaks]15Service 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.16 17== Object Schema18Expand or mouse-over a field for more information about it.19 20++++21<pre>22<div style=""margin-left:13px;""><span title=""(string) 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/api-conventions.md#resources"">apiVersion</span>:23</div><div style=""margin-left:13px;""><span title=""(string) 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/api-conventions.md#types-kinds"">kind</span>:24</div><details open><summary><span title=""(v1.ObjectMeta) Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"">metadata</span>:25</summary><details><summary> <span title=""(object) Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"">annotations</span>:26</summary><div style=""margin-left:13px;""> <span title=""(string)"">[string]</span>:27</div></details><div style=""margin-left:13px;""> <span title=""(string) The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."">clusterName</span>:28</div><div style=""margin-left:13px;""> <span title=""(v1.Time) CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.29 30Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"">creationTimestamp</span>:31</div><div style=""margin-left:13px;""> <span title=""(integer) Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."">deletionGracePeriodSeconds</span>:32</div><div style=""margin-left:13px;""> <span title=""(v1.Time) DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.33 34Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"">deletionTimestamp</span>:35</div><details><summary> <span title=""(array) Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed."">finalizers</span>:36</summary><div style=""margin-left:13px;""> - <span title=""(string)"">[string]</span>:37</div></details><div style=""margin-left:13px;""> <span title=""(string) GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.38 39If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).40 41Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency"">generateName</span>:42</div><div style=""margin-left:13px;""> <span title=""(integer) A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."">generation</span>:43</div><details><summary> <span title=""(v1.Initializers) An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.44 45When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user."">initializers</span>:46</summary><details><summary> <span title=""(array) Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients."">pending</span>:47</summary><div style=""margin-left:13px;""> - <span title=""(string) name of the process that is responsible for initializing this object."">name</span>:48</div></details><details><summary> <span title=""(v1.Status) If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion."">result</span>:49</summary><div style=""margin-left:13px;""> <span title=""(string) 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/api-conventions.md#resources"">apiVersion</span>:50</div><div style=""margin-left:13px;""> <span title=""(integer) Suggested HTTP return code for this status, 0 if not set."">code</span>:51</div><details><summary> <span title=""(v1.StatusDetails) Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type."">details</span>:52</summary><details><summary> <span title=""(array) The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes."">causes</span>:53</summary><div style=""margin-left:13px;""> - <span title=""(string) The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.54 55Examples:56 "name" - the field "name" on the current resource57 "items[0].name" - the field "name" on the first array entry in "items""">field</span>:58</div><div style=""margin-left:13px;""> <span title=""(string) A human-readable description of the cause of the error. This field may be presented as-is to a reader."">message</span>:59</div><div style=""margin-left:13px;""> <span title=""(string) A machine-readable description of the cause of the error. If this value is empty there is no information available."">reason</span>:60</div></details><div style=""margin-left:13px;""> <span title=""(string) The group attribute of the resource associated with the status StatusReason."">group</span>:61</div><div style=""margin-left:13px;""> <span title=""(string) The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"">kind</span>:62</div><div style=""margin-left:13px;""> <span title=""(string) The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)."">name</span>:63</div><div style=""margin-left:13px;""> <span title=""(integer) If specified, the time in seconds before the operation should be retried."">retryAfterSeconds</span>:64</div><div style=""margin-left:13px;""> <span title=""(string) UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids"">uid</span>:65</div></details><div style=""margin-left:13px;""> <span title=""(string) 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/api-conventions.md#types-kinds"">kind</span>:66</div><div style=""margin-left:13px;""> <span title=""(string) A human-readable description of the status of this operation."">message</span>:67</div><details><summary> <span title=""(v1.ListMeta) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"">metadata</span>:68</summary><div style=""margin-left:13px;""> <span title=""(string) String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"">resourceVersion</span>:69</div><div style=""margin-left:13px;""> <span title=""(string) SelfLink is a URL representing this object. Populated by the system. Read-only."">selfLink</span>:70</div></details><div style=""margin-left:13px;""> <span title=""(string) A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it."">reason</span>:71</div><div style=""margin-left:13px;""> <span title=""(string) Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status"">status</span>:72</div></details></details><details><summary> <span title=""(object) Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"">labels</span>:73</summary><div style=""margin-left:13px;""> <span title=""(string)"">[string]</span>:74</div></details><div style=""margin-left:13px;""> <span title=""(string) Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"">name</span>:75</div><div style=""margin-left:13px;""> <span title=""(string) Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.76 77Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"">namespace</span>:78</div><details><summary> <span title=""(array) List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."">ownerReferences</span>:79</summary><div style=""margin-left:13px;""> - <span title=""(string) API version of the referent."">apiVersion</span>:80</div><div style=""margin-left:13px;""> <span title=""(boolean) If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned."">blockOwnerDeletion</span>:81</div><div style=""margin-left:13px;""> <span title=""(boolean) If true, this reference points to the managing controller."">controller</span>:82</div><div style=""margin-left:13px;""> <span title=""(string) Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"">kind</span>:83</div><div style=""margin-left:13px;""> <span title=""(string) Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"">name</span>:84</div><div style=""margin-left:13px;""> <span title=""(string) UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"">uid</span>:85</div></details><div style=""margin-left:13px;""> <span title=""(string) An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.86 87Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"">resourceVersion</span>:88</div><div style=""margin-left:13px;""> <span title=""(string) SelfLink is a URL representing this object. Populated by the system. Read-only."">selfLink</span>:89</div><div style=""margin-left:13px;""> <span title=""(string) UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.90 91Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"">uid</span>:92</div></details><details open><summary><span title=""(v1.ServiceSpec) Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status"">spec</span>:93</summary><div style=""margin-left:13px;""> <span title=""(string) clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies"">clusterIP</span>:94</div><details><summary> <span title=""(array) 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."">externalIPs</span>:95</summary><div style=""margin-left:13px;""> - <span title=""(string)"">[string]</span>:96</div></details><div style=""margin-left:13px;""> <span title=""(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 DNS name and requires Type to be ExternalName."">externalName</span>:97</div><div style=""margin-left:13px;""> <span title=""(string) externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading."">externalTrafficPolicy</span>:98</div><div style=""margin-left:13px;""> <span title=""(integer) healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local."">healthCheckNodePort</span>:99</div><div style=""margin-left:13px;""> <span title=""(string) Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature."">loadBalancerIP</span>:100</div><details><summary> <span title=""(array) 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/configure-cloud-provider-firewall/"">loadBalancerSourceRanges</span>:101</summary><div style=""margin-left:13px;""> - <span title=""(string)"">[string]</span>:102</div></details><details><summary> <span title=""(array) 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"">ports</span>:103</summary><div style=""margin-left:13px;""> - <span title=""(string) The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service."">name</span>:104</div><div style=""margin-left:13px;""> <span title=""(integer) The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport"">nodePort</span>:105</div><div style=""margin-left:13px;""> <span title=""(integer) The port that will be exposed by this service."">port</span>:106</div><div style=""margin-left:13px;""> <span title=""(string) The IP protocol for this port. Supports "TCP" and "UDP". Default is TCP."">protocol</span>:107</div><div style=""margin-left:13px;""> <span title=""(intstr.IntOrString) Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service"">targetPort</span>:108</div></details><details><summary> <span title=""(object) 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/"">selector</span>:109</summary><div style=""margin-left:13px;""> <span title=""(string)"">[string]</span>:110</div></details><div style=""margin-left:13px;""> <span title=""(string) Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies"">sessionAffinity</span>:111</div><div style=""margin-left:13px;""> <span title=""(string) type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types"">type</span>:112</div></details><details><summary><span title=""(v1.ServiceStatus) Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status"">status</span>:113</summary><details><summary> <span title=""(v1.LoadBalancerStatus) LoadBalancer contains the current status of the load-balancer, if one is present."">loadBalancer</span>:114</summary><details><summary> <span title=""(array) Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points."">ingress</span>:115</summary><div style=""margin-left:13px;""> - <span title=""(string) Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)"">hostname</span>:116</div><div style=""margin-left:13px;""> <span title=""(string) IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)"">ip</span>:117</div></details></details></details>118</pre>119++++120 121== Operations122 123[[Post-api-v1-services]]124=== Create a Service125Create a Service126 127==== HTTP request128----129POST /api/v1/services HTTP/1.1130Authorization: Bearer $TOKEN131Accept: application/json132Connection: close133Content-Type: application/json'134 135{136 ""kind"": ""Service"",137 ""apiVersion"": ""v1"",138 ...139}140 141----142 143==== Curl request144----145$ curl -k \\146 -X POST \\147 -d @- \\148 -H ""Authorization: Bearer $TOKEN"" \\149 -H 'Accept: application/json' \\150 -H 'Content-Type: application/json' \\151 https://$ENDPOINT/api/v1/services <<'EOF'152{153 ""kind"": ""Service"",154 ""apiVersion"": ""v1"",155 ...156}157EOF158----159 160==== HTTP body161[cols=""1,5"", options=""header""]162|===163|Parameter|Schema164|body|v1.Service165|===166 167==== Query parameters168[cols=""1,5"", options=""header""]169|===170|Parameter|Description171|pretty|If 'true', then the output is pretty printed.172|===173 174==== Responses175[cols=""1,5"", options=""header""]176|===177|HTTP Code|Schema178|200 OK|v1.Service179|401 Unauthorized|180|===181 182==== Consumes183 184* \\*/*185 186==== Produces187 188* application/json189* application/yaml190* application/vnd.kubernetes.protobuf191 192 193[[Post-api-v1-namespaces-namespace-services]]194=== Create a Service in a namespace195Create a Service196 197==== HTTP request198----199POST /api/v1/namespaces/$NAMESPACE/services HTTP/1.1200Authorization: Bearer $TOKEN201Accept: application/json202Connection: close203Content-Type: application/json'204 205{206 ""kind"": ""Service"",207 ""apiVersion"": ""v1"",208 ...209}210 211----212 213==== Curl request214----215$ curl -k \\216 -X POST \\217 -d @- \\218 -H ""Authorization: Bearer $TOKEN"" \\219 -H 'Accept: application/json' \\220 -H 'Content-Type: application/json' \\221 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services <<'EOF'222{223 ""kind"": ""Service"",224 ""apiVersion"": ""v1"",225 ...226}227EOF228----229 230==== HTTP body231[cols=""1,5"", options=""header""]232|===233|Parameter|Schema234|body|v1.Service235|===236 237==== Path parameters238[cols=""1,5"", options=""header""]239|===240|Parameter|Description241|namespace|object name and auth scope, such as for teams and projects242|===243 244==== Query parameters245[cols=""1,5"", options=""header""]246|===247|Parameter|Description248|pretty|If 'true', then the output is pretty printed.249|===250 251==== Responses252[cols=""1,5"", options=""header""]253|===254|HTTP Code|Schema255|200 OK|v1.Service256|401 Unauthorized|257|===258 259==== Consumes260 261* \\*/*262 263==== Produces264 265* application/json266* application/yaml267* application/vnd.kubernetes.protobuf268 269 270[[Get-api-v1-namespaces-namespace-services-name]]271=== Get a Service in a namespace272Read the specified Service273 274==== HTTP request275----276GET /api/v1/namespaces/$NAMESPACE/services/$NAME HTTP/1.1277Authorization: Bearer $TOKEN278Accept: application/json279Connection: close280----281 282==== Curl request283----284$ curl -k \\285 -H ""Authorization: Bearer $TOKEN"" \\286 -H 'Accept: application/json' \\287 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME288----289 290==== Path parameters291[cols=""1,5"", options=""header""]292|===293|Parameter|Description294|name|name of the Service295|namespace|object name and auth scope, such as for teams and projects296|===297 298==== Query parameters299[cols=""1,5"", options=""header""]300|===301|Parameter|Description302|pretty|If 'true', then the output is pretty printed.303|exact|Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.304|export|Should this value be exported. Export strips fields that a user can not specify.305|===306 307==== Responses308[cols=""1,5"", options=""header""]309|===310|HTTP Code|Schema311|200 OK|v1.Service312|401 Unauthorized|313|===314 315==== Consumes316 317* \\*/*318 319==== Produces320 321* application/json322* application/yaml323* application/vnd.kubernetes.protobuf324 325 326[[Get-api-v1-services]]327=== Get all Services328List or watch objects of kind Service329 330==== HTTP request331----332GET /api/v1/services HTTP/1.1333Authorization: Bearer $TOKEN334Accept: application/json335Connection: close336----337 338==== Curl request339----340$ curl -k \\341 -H ""Authorization: Bearer $TOKEN"" \\342 -H 'Accept: application/json' \\343 https://$ENDPOINT/api/v1/services344----345 346==== Query parameters347[cols=""1,5"", options=""header""]348|===349|Parameter|Description350|pretty|If 'true', then the output is pretty printed.351|fieldSelector|A selector to restrict the list of returned objects by their fields. Defaults to everything.352|includeUninitialized|If true, partially initialized resources are included in the response.353|labelSelector|A selector to restrict the list of returned objects by their labels. Defaults to everything.354|resourceVersion|When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.355|timeoutSeconds|Timeout for the list/watch call.356|watch|Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.357|===358 359==== Responses360[cols=""1,5"", options=""header""]361|===362|HTTP Code|Schema363|200 OK|v1.ServiceList364|401 Unauthorized|365|===366 367==== Consumes368 369* \\*/*370 371==== Produces372 373* application/json374* application/yaml375* application/vnd.kubernetes.protobuf376* application/json;stream=watch377* application/vnd.kubernetes.protobuf;stream=watch378 379 380[[Get-api-v1-namespaces-namespace-services]]381=== Get all Services in a namespace382List or watch objects of kind Service383 384==== HTTP request385----386GET /api/v1/namespaces/$NAMESPACE/services HTTP/1.1387Authorization: Bearer $TOKEN388Accept: application/json389Connection: close390----391 392==== Curl request393----394$ curl -k \\395 -H ""Authorization: Bearer $TOKEN"" \\396 -H 'Accept: application/json' \\397 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services398----399 400==== Path parameters401[cols=""1,5"", options=""header""]402|===403|Parameter|Description404|namespace|object name and auth scope, such as for teams and projects405|===406 407==== Query parameters408[cols=""1,5"", options=""header""]409|===410|Parameter|Description411|pretty|If 'true', then the output is pretty printed.412|fieldSelector|A selector to restrict the list of returned objects by their fields. Defaults to everything.413|includeUninitialized|If true, partially initialized resources are included in the response.414|labelSelector|A selector to restrict the list of returned objects by their labels. Defaults to everything.415|resourceVersion|When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.416|timeoutSeconds|Timeout for the list/watch call.417|watch|Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.418|===419 420==== Responses421[cols=""1,5"", options=""header""]422|===423|HTTP Code|Schema424|200 OK|v1.ServiceList425|401 Unauthorized|426|===427 428==== Consumes429 430* \\*/*431 432==== Produces433 434* application/json435* application/yaml436* application/vnd.kubernetes.protobuf437* application/json;stream=watch438* application/vnd.kubernetes.protobuf;stream=watch439 440 441[[Get-api-v1-watch-namespaces-namespace-services-name]]442=== Watch a Service in a namespace443Watch changes to an object of kind Service444 445==== HTTP request446----447GET /api/v1/watch/namespaces/$NAMESPACE/services/$NAME HTTP/1.1448Authorization: Bearer $TOKEN449Accept: application/json450Connection: close451----452 453==== Curl request454----455$ curl -k \\456 -H ""Authorization: Bearer $TOKEN"" \\457 -H 'Accept: application/json' \\458 https://$ENDPOINT/api/v1/watch/namespaces/$NAMESPACE/services/$NAME459----460 461==== Path parameters462[cols=""1,5"", options=""header""]463|===464|Parameter|Description465|name|name of the Service466|namespace|object name and auth scope, such as for teams and projects467|===468 469==== Query parameters470[cols=""1,5"", options=""header""]471|===472|Parameter|Description473|fieldSelector|A selector to restrict the list of returned objects by their fields. Defaults to everything.474|includeUninitialized|If true, partially initialized resources are included in the response.475|labelSelector|A selector to restrict the list of returned objects by their labels. Defaults to everything.476|pretty|If 'true', then the output is pretty printed.477|resourceVersion|When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.478|timeoutSeconds|Timeout for the list/watch call.479|watch|Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.480|===481 482==== Responses483[cols=""1,5"", options=""header""]484|===485|HTTP Code|Schema486|200 OK|v1.WatchEvent487|401 Unauthorized|488|===489 490==== Consumes491 492* \\*/*493 494==== Produces495 496* application/json497* application/yaml498* application/vnd.kubernetes.protobuf499* application/json;stream=watch500* application/vnd.kubernetes.protobuf;stream=watch501 502 503[[Get-api-v1-watch-services]]504=== Watch all Services505Watch individual changes to a list of Service506 507==== HTTP request508----509GET /api/v1/watch/services HTTP/1.1510Authorization: Bearer $TOKEN511Accept: application/json512Connection: close513----514 515==== Curl request516----517$ curl -k \\518 -H ""Authorization: Bearer $TOKEN"" \\519 -H 'Accept: application/json' \\520 https://$ENDPOINT/api/v1/watch/services521----522 523==== Query parameters524[cols=""1,5"", options=""header""]525|===526|Parameter|Description527|fieldSelector|A selector to restrict the list of returned objects by their fields. Defaults to everything.528|includeUninitialized|If true, partially initialized resources are included in the response.529|labelSelector|A selector to restrict the list of returned objects by their labels. Defaults to everything.530|pretty|If 'true', then the output is pretty printed.531|resourceVersion|When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.532|timeoutSeconds|Timeout for the list/watch call.533|watch|Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.534|===535 536==== Responses537[cols=""1,5"", options=""header""]538|===539|HTTP Code|Schema540|200 OK|v1.WatchEvent541|401 Unauthorized|542|===543 544==== Consumes545 546* \\*/*547 548==== Produces549 550* application/json551* application/yaml552* application/vnd.kubernetes.protobuf553* application/json;stream=watch554* application/vnd.kubernetes.protobuf;stream=watch555 556 557[[Get-api-v1-watch-namespaces-namespace-services]]558=== Watch all Services in a namespace559Watch individual changes to a list of Service560 561==== HTTP request562----563GET /api/v1/watch/namespaces/$NAMESPACE/services HTTP/1.1564Authorization: Bearer $TOKEN565Accept: application/json566Connection: close567----568 569==== Curl request570----571$ curl -k \\572 -H ""Authorization: Bearer $TOKEN"" \\573 -H 'Accept: application/json' \\574 https://$ENDPOINT/api/v1/watch/namespaces/$NAMESPACE/services575----576 577==== Path parameters578[cols=""1,5"", options=""header""]579|===580|Parameter|Description581|namespace|object name and auth scope, such as for teams and projects582|===583 584==== Query parameters585[cols=""1,5"", options=""header""]586|===587|Parameter|Description588|fieldSelector|A selector to restrict the list of returned objects by their fields. Defaults to everything.589|includeUninitialized|If true, partially initialized resources are included in the response.590|labelSelector|A selector to restrict the list of returned objects by their labels. Defaults to everything.591|pretty|If 'true', then the output is pretty printed.592|resourceVersion|When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.593|timeoutSeconds|Timeout for the list/watch call.594|watch|Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.595|===596 597==== Responses598[cols=""1,5"", options=""header""]599|===600|HTTP Code|Schema601|200 OK|v1.WatchEvent602|401 Unauthorized|603|===604 605==== Consumes606 607* \\*/*608 609==== Produces610 611* application/json612* application/yaml613* application/vnd.kubernetes.protobuf614* application/json;stream=watch615* application/vnd.kubernetes.protobuf;stream=watch616 617 618[[Put-api-v1-namespaces-namespace-services-name]]619=== Update a Service in a namespace620Replace the specified Service621 622==== HTTP request623----624PUT /api/v1/namespaces/$NAMESPACE/services/$NAME HTTP/1.1625Authorization: Bearer $TOKEN626Accept: application/json627Connection: close628Content-Type: application/json'629 630{631 ""kind"": ""Service"",632 ""apiVersion"": ""v1"",633 ...634}635 636----637 638==== Curl request639----640$ curl -k \\641 -X PUT \\642 -d @- \\643 -H ""Authorization: Bearer $TOKEN"" \\644 -H 'Accept: application/json' \\645 -H 'Content-Type: application/json' \\646 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME <<'EOF'647{648 ""kind"": ""Service"",649 ""apiVersion"": ""v1"",650 ...651}652EOF653----654 655==== HTTP body656[cols=""1,5"", options=""header""]657|===658|Parameter|Schema659|body|v1.Service660|===661 662==== Path parameters663[cols=""1,5"", options=""header""]664|===665|Parameter|Description666|name|name of the Service667|namespace|object name and auth scope, such as for teams and projects668|===669 670==== Query parameters671[cols=""1,5"", options=""header""]672|===673|Parameter|Description674|pretty|If 'true', then the output is pretty printed.675|===676 677==== Responses678[cols=""1,5"", options=""header""]679|===680|HTTP Code|Schema681|200 OK|v1.Service682|401 Unauthorized|683|===684 685==== Consumes686 687* \\*/*688 689==== Produces690 691* application/json692* application/yaml693* application/vnd.kubernetes.protobuf694 695 696[[Patch-api-v1-namespaces-namespace-services-name]]697=== Patch a Service in a namespace698Partially update the specified Service699 700==== HTTP request701----702PATCH /api/v1/namespaces/$NAMESPACE/services/$NAME HTTP/1.1703Authorization: Bearer $TOKEN704Accept: application/json705Connection: close706Content-Type: application/json-patch+json'707 708{709 ...710}711 712----713 714==== Curl request715----716$ curl -k \\717 -X PATCH \\718 -d @- \\719 -H ""Authorization: Bearer $TOKEN"" \\720 -H 'Accept: application/json' \\721 -H 'Content-Type: application/json-patch+json' \\722 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME <<'EOF'723{724 ...725}726EOF727----728 729==== HTTP body730[cols=""1,5"", options=""header""]731|===732|Parameter|Schema733|body|v1.Patch734|===735 736==== Path parameters737[cols=""1,5"", options=""header""]738|===739|Parameter|Description740|name|name of the Service741|namespace|object name and auth scope, such as for teams and projects742|===743 744==== Query parameters745[cols=""1,5"", options=""header""]746|===747|Parameter|Description748|pretty|If 'true', then the output is pretty printed.749|===750 751==== Responses752[cols=""1,5"", options=""header""]753|===754|HTTP Code|Schema755|200 OK|v1.Service756|401 Unauthorized|757|===758 759==== Consumes760 761* application/json-patch+json762* application/merge-patch+json763* application/strategic-merge-patch+json764 765==== Produces766 767* application/json768* application/yaml769* application/vnd.kubernetes.protobuf770 771 772[[Delete-api-v1-namespaces-namespace-services-name]]773=== Delete a Service in a namespace774Delete a Service775 776==== HTTP request777----778DELETE /api/v1/namespaces/$NAMESPACE/services/$NAME HTTP/1.1779Authorization: Bearer $TOKEN780Accept: application/json781Connection: close782----783 784==== Curl request785----786$ curl -k \\787 -X DELETE \\788 -H ""Authorization: Bearer $TOKEN"" \\789 -H 'Accept: application/json' \\790 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME791----792 793==== Path parameters794[cols=""1,5"", options=""header""]795|===796|Parameter|Description797|name|name of the Service798|namespace|object name and auth scope, such as for teams and projects799|===800 801==== Query parameters802[cols=""1,5"", options=""header""]803|===804|Parameter|Description805|pretty|If 'true', then the output is pretty printed.806|===807 808==== Responses809[cols=""1,5"", options=""header""]810|===811|HTTP Code|Schema812|200 OK|v1.Status813|401 Unauthorized|814|===815 816==== Consumes817 818* \\*/*819 820==== Produces821 822* application/json823* application/yaml824* application/vnd.kubernetes.protobuf825 826 827[[Get-api-v1-namespaces-namespace-services-name-status]]828=== Get status of a Service in a namespace829Read status of the specified Service830 831==== HTTP request832----833GET /api/v1/namespaces/$NAMESPACE/services/$NAME/status HTTP/1.1834Authorization: Bearer $TOKEN835Accept: application/json836Connection: close837----838 839==== Curl request840----841$ curl -k \\842 -H ""Authorization: Bearer $TOKEN"" \\843 -H 'Accept: application/json' \\844 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/status845----846 847==== Path parameters848[cols=""1,5"", options=""header""]849|===850|Parameter|Description851|name|name of the Service852|namespace|object name and auth scope, such as for teams and projects853|===854 855==== Query parameters856[cols=""1,5"", options=""header""]857|===858|Parameter|Description859|pretty|If 'true', then the output is pretty printed.860|===861 862==== Responses863[cols=""1,5"", options=""header""]864|===865|HTTP Code|Schema866|200 OK|v1.Service867|401 Unauthorized|868|===869 870==== Consumes871 872* \\*/*873 874==== Produces875 876* application/json877* application/yaml878* application/vnd.kubernetes.protobuf879 880 881[[Put-api-v1-namespaces-namespace-services-name-status]]882=== Update status of a Service in a namespace883Replace status of the specified Service884 885==== HTTP request886----887PUT /api/v1/namespaces/$NAMESPACE/services/$NAME/status HTTP/1.1888Authorization: Bearer $TOKEN889Accept: application/json890Connection: close891Content-Type: application/json'892 893{894 ""kind"": ""Service"",895 ""apiVersion"": ""v1"",896 ...897}898 899----900 901==== Curl request902----903$ curl -k \\904 -X PUT \\905 -d @- \\906 -H ""Authorization: Bearer $TOKEN"" \\907 -H 'Accept: application/json' \\908 -H 'Content-Type: application/json' \\909 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/status <<'EOF'910{911 ""kind"": ""Service"",912 ""apiVersion"": ""v1"",913 ...914}915EOF916----917 918==== HTTP body919[cols=""1,5"", options=""header""]920|===921|Parameter|Schema922|body|v1.Service923|===924 925==== Path parameters926[cols=""1,5"", options=""header""]927|===928|Parameter|Description929|name|name of the Service930|namespace|object name and auth scope, such as for teams and projects931|===932 933==== Query parameters934[cols=""1,5"", options=""header""]935|===936|Parameter|Description937|pretty|If 'true', then the output is pretty printed.938|===939 940==== Responses941[cols=""1,5"", options=""header""]942|===943|HTTP Code|Schema944|200 OK|v1.Service945|401 Unauthorized|946|===947 948==== Consumes949 950* \\*/*951 952==== Produces953 954* application/json955* application/yaml956* application/vnd.kubernetes.protobuf957 958 959[[Patch-api-v1-namespaces-namespace-services-name-status]]960=== Patch status of a Service in a namespace961Partially update status of the specified Service962 963==== HTTP request964----965PATCH /api/v1/namespaces/$NAMESPACE/services/$NAME/status HTTP/1.1966Authorization: Bearer $TOKEN967Accept: application/json968Connection: close969Content-Type: application/json-patch+json'970 971{972 ...973}974 975----976 977==== Curl request978----979$ curl -k \\980 -X PATCH \\981 -d @- \\982 -H ""Authorization: Bearer $TOKEN"" \\983 -H 'Accept: application/json' \\984 -H 'Content-Type: application/json-patch+json' \\985 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/status <<'EOF'986{987 ...988}989EOF990----991 992==== HTTP body993[cols=""1,5"", options=""header""]994|===995|Parameter|Schema996|body|v1.Patch997|===998 999==== Path parameters1000[cols=""1,5"", options=""header""]1001|===1002|Parameter|Description1003|name|name of the Service1004|namespace|object name and auth scope, such as for teams and projects1005|===1006 1007==== Query parameters1008[cols=""1,5"", options=""header""]1009|===1010|Parameter|Description1011|pretty|If 'true', then the output is pretty printed.1012|===1013 1014==== Responses1015[cols=""1,5"", options=""header""]1016|===1017|HTTP Code|Schema1018|200 OK|v1.Service1019|401 Unauthorized|1020|===1021 1022==== Consumes1023 1024* application/json-patch+json1025* application/merge-patch+json1026* application/strategic-merge-patch+json1027 1028==== Produces1029 1030* application/json1031* application/yaml1032* application/vnd.kubernetes.protobuf1033 1034 1035[[Options-api-v1-namespaces-namespace-services-name-proxy]]1036=== Proxy OPTIONS request to a Service in a namespace1037Connect OPTIONS requests to proxy of Service1038 1039==== HTTP request1040----1041OPTIONS /api/v1/namespaces/$NAMESPACE/services/$NAME/proxy HTTP/1.11042Authorization: Bearer $TOKEN1043Accept: application/json1044Connection: close1045----1046 1047==== Curl request1048----1049$ curl -k \\1050 -X OPTIONS \\1051 -H ""Authorization: Bearer $TOKEN"" \\1052 -H 'Accept: application/json' \\1053 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/proxy1054----1055 1056==== Path parameters1057[cols=""1,5"", options=""header""]1058|===1059|Parameter|Description1060|name|name of the Service1061|namespace|object name and auth scope, such as for teams and projects1062|===1063 1064==== Query parameters1065[cols=""1,5"", options=""header""]1066|===1067|Parameter|Description1068|path|Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.1069|===1070 1071==== Responses1072[cols=""1,5"", options=""header""]1073|===1074|HTTP Code|Schema1075|200 OK|string1076|401 Unauthorized|1077|===1078 1079==== Consumes1080 1081* \\*/*1082 1083==== Produces1084 1085* \\*/*1086 1087 1088[[Post-api-v1-namespaces-namespace-services-name-proxy]]1089=== Proxy POST request to a Service in a namespace1090Connect POST requests to proxy of Service1091 1092==== HTTP request1093----1094POST /api/v1/namespaces/$NAMESPACE/services/$NAME/proxy HTTP/1.11095Authorization: Bearer $TOKEN1096Accept: application/json1097Connection: close1098----1099 1100==== Curl request1101----1102$ curl -k \\1103 -X POST \\1104 -H ""Authorization: Bearer $TOKEN"" \\1105 -H 'Accept: application/json' \\1106 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/proxy1107----1108 1109==== Path parameters1110[cols=""1,5"", options=""header""]1111|===1112|Parameter|Description1113|name|name of the Service1114|namespace|object name and auth scope, such as for teams and projects1115|===1116 1117==== Query parameters1118[cols=""1,5"", options=""header""]1119|===1120|Parameter|Description1121|path|Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.1122|===1123 1124==== Responses1125[cols=""1,5"", options=""header""]1126|===1127|HTTP Code|Schema1128|200 OK|string1129|401 Unauthorized|1130|===1131 1132==== Consumes1133 1134* \\*/*1135 1136==== Produces1137 1138* \\*/*1139 1140 1141[[Head-api-v1-namespaces-namespace-services-name-proxy]]1142=== Proxy HEAD request to a Service in a namespace1143Connect HEAD requests to proxy of Service1144 1145==== HTTP request1146----1147HEAD /api/v1/namespaces/$NAMESPACE/services/$NAME/proxy HTTP/1.11148Authorization: Bearer $TOKEN1149Accept: application/json1150Connection: close1151----1152 1153==== Curl request1154----1155$ curl -k \\1156 -X HEAD \\1157 -H ""Authorization: Bearer $TOKEN"" \\1158 -H 'Accept: application/json' \\1159 https://$ENDPOINT/api/v1/namespaces/$NAMESPACE/services/$NAME/proxy1160----1161 1162==== Path parameters1163[cols=""1,5"", options=""header""]1164|===1165|Parameter|Description1166|name|name of the Service1167|namespace|object name and auth scope, such as for teams and projects1168|===1169 1170==== Query parameters1171[cols=""1,5"", options=""header""]1172|===1173|Parameter|Description1174|path|Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.1175|===1176 1177==== Responses1178[cols=""1,5"", options=""header""]1179|===1180|HTTP Code|Schema1181|200 OK|string1182|401 Unauthorized|1183|===1184 1185==== Consumes1186 1187* \\*/*1188 1189==== Produces1190 1191* \\*/*1192 1193 1194[[Get-api-v1-namespaces-namespace-services-name-proxy]]1195=== Proxy GET request to a Service in a namespace1196Connect GET requests to proxy of Service1197 1198==== HTTP request1199----1200GET /api/v1/namespaces/$NAMESPACE/services/$NAME/proxy HTTP/1.1