This the multi-page printable view of this section. Click here to print.
Service Resources
- 1: Service
- 2: Endpoints
- 3: EndpointSlice
- 4: Ingress
- 5: IngressClass
1 - Service
apiVersion: v1
import "k8s.io/api/core/v1"
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.
-
apiVersion: v1
-
kind: Service
-
metadata (ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
spec (ServiceSpec)
Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
status (ServiceStatus)
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
ServiceSpec
ServiceSpec describes the attributes that a user creates on a service.
-
selector (map[string]string)
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/
-
ports ([]ServicePort)
Patch strategy: merge on key
port
Map: unique values on keys
port, protocol
will be kept during a mergeThe list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
ServicePort contains information on service's port.
-
ports.port (int32), required
The port that will be exposed by this service.
-
ports.targetPort (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
IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
-
ports.protocol (string)
The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
-
ports.name (string)
The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.
-
ports.nodePort (int32)
The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
-
ports.appProtocol (string)
The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
-
-
type (string)
type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "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 or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
-
ipFamilies ([]string)
Atomic: will be replaced during a merge
IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. 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.
-
ipFamilyPolicy (string)
IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.
-
clusterIP (string)
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
-
clusterIPs ([]string)
Atomic: will be replaced during a merge
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.
Unless the "IPv6DualStack" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, 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
-
externalIPs ([]string)
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.
-
sessionAffinity (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
-
loadBalancerIP (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.
-
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. 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/
-
loadBalancerClass (string)
loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.
-
externalName (string)
externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase 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. "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.
-
internalTrafficPolicy (string)
InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster".
-
healthCheckNodePort (int32)
healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type).
-
publishNotReadyAddresses (boolean)
publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered "ready" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.
-
sessionAffinityConfig (SessionAffinityConfig)
sessionAffinityConfig contains the configurations of session affinity.
SessionAffinityConfig represents the configurations of session affinity.
-
sessionAffinityConfig.clientIP (ClientIPConfig)
clientIP contains the configurations of Client IP based session affinity.
ClientIPConfig represents the configurations of Client IP based session affinity.
-
sessionAffinityConfig.clientIP.timeoutSeconds (int32)
timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours).
-
-
-
allocateLoadBalancerNodePorts (boolean)
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. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.
ServiceStatus
ServiceStatus represents the current status of a service.
-
conditions ([]Condition)
Patch strategy: merge on key
type
Map: unique values on key type will be kept during a merge
Current service state
Condition contains details for one aspect of the current state of this API Resource.
-
conditions.lastTransitionTime (Time), required
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
-
conditions.message (string), required
message is a human readable message indicating details about the transition. This may be an empty string.
-
conditions.reason (string), required
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
-
conditions.status (string), required
status of the condition, one of True, False, Unknown.
-
conditions.type (string), required
type of condition in CamelCase or in foo.example.com/CamelCase.
-
conditions.observedGeneration (int64)
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
-
-
loadBalancer (LoadBalancerStatus)
LoadBalancer contains the current status of the load-balancer, if one is present.
LoadBalancerStatus represents the status of a load-balancer.
-
loadBalancer.ingress ([]LoadBalancerIngress)
Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.
LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
-
loadBalancer.ingress.hostname (string)
Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
-
loadBalancer.ingress.ip (string)
IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)
-
loadBalancer.ingress.ports ([]PortStatus)
Atomic: will be replaced during a merge
Ports is a list of records of service ports If used, every port defined in the service should have an entry in it
-
loadBalancer.ingress.ports.port (int32), required
Port is the port number of the service port of which status is recorded here
-
loadBalancer.ingress.ports.protocol (string), required
Protocol is the protocol of the service port of which status is recorded here The supported values are: "TCP", "UDP", "SCTP"
-
loadBalancer.ingress.ports.error (string)
Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use CamelCase names
- cloud provider specific error values must have names that comply with the format foo.example.com/CamelCase.
-
-
-
ServiceList
ServiceList holds a list of services.
-
apiVersion: v1
-
kind: ServiceList
-
metadata (ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
items ([]Service), required
List of services
Operations
get
read the specified Service
HTTP Request
GET /api/v1/namespaces/{namespace}/services/{name}
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (Service): OK
401: Unauthorized
get
read status of the specified Service
HTTP Request
GET /api/v1/namespaces/{namespace}/services/{name}/status
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (Service): OK
401: Unauthorized
list
list or watch objects of kind Service
HTTP Request
GET /api/v1/namespaces/{namespace}/services
Parameters
-
namespace (in path): string, required
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (ServiceList): OK
401: Unauthorized
list
list or watch objects of kind Service
HTTP Request
GET /api/v1/services
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (ServiceList): OK
401: Unauthorized
create
create a Service
HTTP Request
POST /api/v1/namespaces/{namespace}/services
Parameters
-
namespace (in path): string, required
-
body: Service, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Service): OK
201 (Service): Created
202 (Service): Accepted
401: Unauthorized
update
replace the specified Service
HTTP Request
PUT /api/v1/namespaces/{namespace}/services/{name}
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
body: Service, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Service): OK
201 (Service): Created
401: Unauthorized
update
replace status of the specified Service
HTTP Request
PUT /api/v1/namespaces/{namespace}/services/{name}/status
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
body: Service, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Service): OK
201 (Service): Created
401: Unauthorized
patch
partially update the specified Service
HTTP Request
PATCH /api/v1/namespaces/{namespace}/services/{name}
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (Service): OK
201 (Service): Created
401: Unauthorized
patch
partially update status of the specified Service
HTTP Request
PATCH /api/v1/namespaces/{namespace}/services/{name}/status
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (Service): OK
201 (Service): Created
401: Unauthorized
delete
delete a Service
HTTP Request
DELETE /api/v1/namespaces/{namespace}/services/{name}
Parameters
-
name (in path): string, required
name of the Service
-
namespace (in path): string, required
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
2 - Endpoints
apiVersion: v1
import "k8s.io/api/core/v1"
Endpoints
Endpoints is a collection of endpoints that implement the actual service. Example: Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses: [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] }, ]
-
apiVersion: v1
-
kind: Endpoints
-
metadata (ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
subsets ([]EndpointSubset)
The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
-
subsets.addresses ([]EndpointAddress)
IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.
EndpointAddress is a tuple that describes single IP address.
-
subsets.addresses.ip (string), required
The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.
-
subsets.addresses.hostname (string)
The Hostname of this endpoint
-
subsets.addresses.nodeName (string)
Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
-
subsets.addresses.targetRef (ObjectReference)
Reference to object providing the endpoint.
-
-
subsets.notReadyAddresses ([]EndpointAddress)
IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.
EndpointAddress is a tuple that describes single IP address.
-
subsets.notReadyAddresses.ip (string), required
The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.
-
subsets.notReadyAddresses.hostname (string)
The Hostname of this endpoint
-
subsets.notReadyAddresses.nodeName (string)
Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
-
subsets.notReadyAddresses.targetRef (ObjectReference)
Reference to object providing the endpoint.
-
-
subsets.ports ([]EndpointPort)
Port numbers available on the related IP addresses.
EndpointPort is a tuple that describes a single port.
-
subsets.ports.port (int32), required
The port number of the endpoint.
-
subsets.ports.protocol (string)
The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
-
subsets.ports.name (string)
The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
-
subsets.ports.appProtocol (string)
The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
-
-
EndpointsList
EndpointsList is a list of endpoints.
-
apiVersion: v1
-
kind: EndpointsList
-
metadata (ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
items ([]Endpoints), required
List of endpoints.
Operations
get
read the specified Endpoints
HTTP Request
GET /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
name (in path): string, required
name of the Endpoints
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (Endpoints): OK
401: Unauthorized
list
list or watch objects of kind Endpoints
HTTP Request
GET /api/v1/namespaces/{namespace}/endpoints
Parameters
-
namespace (in path): string, required
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (EndpointsList): OK
401: Unauthorized
list
list or watch objects of kind Endpoints
HTTP Request
GET /api/v1/endpoints
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (EndpointsList): OK
401: Unauthorized
create
create Endpoints
HTTP Request
POST /api/v1/namespaces/{namespace}/endpoints
Parameters
-
namespace (in path): string, required
-
body: Endpoints, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Endpoints): OK
201 (Endpoints): Created
202 (Endpoints): Accepted
401: Unauthorized
update
replace the specified Endpoints
HTTP Request
PUT /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
name (in path): string, required
name of the Endpoints
-
namespace (in path): string, required
-
body: Endpoints, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Endpoints): OK
201 (Endpoints): Created
401: Unauthorized
patch
partially update the specified Endpoints
HTTP Request
PATCH /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
name (in path): string, required
name of the Endpoints
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (Endpoints): OK
201 (Endpoints): Created
401: Unauthorized
delete
delete Endpoints
HTTP Request
DELETE /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
name (in path): string, required
name of the Endpoints
-
namespace (in path): string, required
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of Endpoints
HTTP Request
DELETE /api/v1/namespaces/{namespace}/endpoints
Parameters
-
namespace (in path): string, required
-
body: DeleteOptions
-
continue (in query): string
-
dryRun (in query): string
-
fieldSelector (in query): string
-
gracePeriodSeconds (in query): integer
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
Response
200 (Status): OK
401: Unauthorized
3 - EndpointSlice
apiVersion: discovery.k8s.io/v1
import "k8s.io/api/discovery/v1"
EndpointSlice
EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
-
apiVersion: discovery.k8s.io/v1
-
kind: EndpointSlice
-
metadata (ObjectMeta)
Standard object's metadata.
-
addressType (string), required
addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
-
endpoints ([]Endpoint), required
Atomic: will be replaced during a merge
endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
Endpoint represents a single logical "backend" implementing a service.
-
endpoints.addresses ([]string), required
Set: unique values will be kept during a merge
addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
-
endpoints.conditions (EndpointConditions)
conditions contains information about the current status of the endpoint.
EndpointConditions represents the current condition of an endpoint.
-
endpoints.conditions.ready (boolean)
ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints.
-
endpoints.conditions.serving (boolean)
serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.
-
endpoints.conditions.terminating (boolean)
terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.
-
-
endpoints.deprecatedTopology (map[string]string)
deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
-
endpoints.hints (EndpointHints)
hints contains information associated with how an endpoint should be consumed.
EndpointHints provides hints describing how an endpoint should be consumed.
-
endpoints.hints.forZones ([]ForZone)
Atomic: will be replaced during a merge
forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.
ForZone provides information about which zones should consume this endpoint.
-
endpoints.hints.forZones.name (string), required
name represents the name of the zone.
-
-
-
endpoints.hostname (string)
hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
-
endpoints.nodeName (string)
nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
-
endpoints.targetRef (ObjectReference)
targetRef is a reference to a Kubernetes object that represents this endpoint.
-
endpoints.zone (string)
zone is the name of the Zone this endpoint exists in.
-
-
ports ([]EndpointPort)
Atomic: will be replaced during a merge
ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
EndpointPort represents a Port used by an EndpointSlice
-
ports.port (int32)
The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.
-
ports.protocol (string)
The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
-
ports.name (string)
The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.
-
ports.appProtocol (string)
The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
-
EndpointSliceList
EndpointSliceList represents a list of endpoint slices
-
apiVersion: discovery.k8s.io/v1
-
kind: EndpointSliceList
-
metadata (ListMeta)
Standard list metadata.
-
items ([]EndpointSlice), required
List of endpoint slices
Operations
get
read the specified EndpointSlice
HTTP Request
GET /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
Parameters
-
name (in path): string, required
name of the EndpointSlice
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (EndpointSlice): OK
401: Unauthorized
list
list or watch objects of kind EndpointSlice
HTTP Request
GET /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
Parameters
-
namespace (in path): string, required
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (EndpointSliceList): OK
401: Unauthorized
list
list or watch objects of kind EndpointSlice
HTTP Request
GET /apis/discovery.k8s.io/v1/endpointslices
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (EndpointSliceList): OK
401: Unauthorized
create
create an EndpointSlice
HTTP Request
POST /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
Parameters
-
namespace (in path): string, required
-
body: EndpointSlice, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (EndpointSlice): OK
201 (EndpointSlice): Created
202 (EndpointSlice): Accepted
401: Unauthorized
update
replace the specified EndpointSlice
HTTP Request
PUT /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
Parameters
-
name (in path): string, required
name of the EndpointSlice
-
namespace (in path): string, required
-
body: EndpointSlice, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (EndpointSlice): OK
201 (EndpointSlice): Created
401: Unauthorized
patch
partially update the specified EndpointSlice
HTTP Request
PATCH /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
Parameters
-
name (in path): string, required
name of the EndpointSlice
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (EndpointSlice): OK
201 (EndpointSlice): Created
401: Unauthorized
delete
delete an EndpointSlice
HTTP Request
DELETE /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
Parameters
-
name (in path): string, required
name of the EndpointSlice
-
namespace (in path): string, required
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of EndpointSlice
HTTP Request
DELETE /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
Parameters
-
namespace (in path): string, required
-
body: DeleteOptions
-
continue (in query): string
-
dryRun (in query): string
-
fieldSelector (in query): string
-
gracePeriodSeconds (in query): integer
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
Response
200 (Status): OK
401: Unauthorized
4 - Ingress
apiVersion: networking.k8s.io/v1
import "k8s.io/api/networking/v1"
Ingress
Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
-
apiVersion: networking.k8s.io/v1
-
kind: Ingress
-
metadata (ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
spec (IngressSpec)
Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
status (IngressStatus)
Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
IngressSpec
IngressSpec describes the Ingress the user wishes to exist.
-
defaultBackend (IngressBackend)
DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.
-
ingressClassName (string)
IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated
kubernetes.io/ingress.class
annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation. -
rules ([]IngressRule)
Atomic: will be replaced during a merge
A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
-
rules.host (string)
Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the IP in the Spec of the parent Ingress. 2. The
:
delimiter is not respected because ports are not allowed. Currently the port of an Ingress is implicitly :80 for http and :443 for https. Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.Host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. ".foo.com"). The wildcard character '' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.
-
rules.http (HTTPIngressRuleValue)
HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://
/ ? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. -
rules.http.paths ([]HTTPIngressPath), required
Atomic: will be replaced during a merge
A collection of paths that map requests to backends.
HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.
-
rules.http.paths.backend (IngressBackend), required
Backend defines the referenced service endpoint to which the traffic will be forwarded to.
-
rules.http.paths.pathType (string), required
PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is done on a path element by element basis. A path element refers is the list of labels in the path split by the '/' separator. A request is a match for path p if every p is an element-wise prefix of p of the request path. Note that if the last element of the path is a substring of the last element in request path, it is not a match (e.g. /foo/bar matches /foo/bar/baz, but does not match /foo/barbaz).
- ImplementationSpecific: Interpretation of the Path matching is up to the IngressClass. Implementations can treat this as a separate PathType or treat it identically to Prefix or Exact path types. Implementations are required to support all path types.
-
rules.http.paths.path (string)
Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value "Exact" or "Prefix".
-
-
-
-
tls ([]IngressTLS)
Atomic: will be replaced during a merge
TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
IngressTLS describes the transport layer security associated with an Ingress.
-
tls.hosts ([]string)
Atomic: will be replaced during a merge
Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
-
tls.secretName (string)
SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
-
IngressBackend
IngressBackend describes all endpoints for a given service and port.
-
resource (TypedLocalObjectReference)
Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service".
-
service (IngressServiceBackend)
Service references a Service as a Backend. This is a mutually exclusive setting with "Resource".
IngressServiceBackend references a Kubernetes Service as a Backend.
-
service.name (string), required
Name is the referenced service. The service must exist in the same namespace as the Ingress object.
-
service.port (ServiceBackendPort)
Port of the referenced service. A port name or port number is required for a IngressServiceBackend.
ServiceBackendPort is the service port being referenced.
-
service.port.name (string)
Name is the name of the port on the Service. This is a mutually exclusive setting with "Number".
-
service.port.number (int32)
Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with "Name".
-
-
IngressStatus
IngressStatus describe the current state of the Ingress.
-
loadBalancer (LoadBalancerStatus)
LoadBalancer contains the current status of the load-balancer.
LoadBalancerStatus represents the status of a load-balancer.
-
loadBalancer.ingress ([]LoadBalancerIngress)
Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.
LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.
-
loadBalancer.ingress.hostname (string)
Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)
-
loadBalancer.ingress.ip (string)
IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)
-
loadBalancer.ingress.ports ([]PortStatus)
Atomic: will be replaced during a merge
Ports is a list of records of service ports If used, every port defined in the service should have an entry in it
-
loadBalancer.ingress.ports.port (int32), required
Port is the port number of the service port of which status is recorded here
-
loadBalancer.ingress.ports.protocol (string), required
Protocol is the protocol of the service port of which status is recorded here The supported values are: "TCP", "UDP", "SCTP"
-
loadBalancer.ingress.ports.error (string)
Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use CamelCase names
- cloud provider specific error values must have names that comply with the format foo.example.com/CamelCase.
-
-
-
IngressList
IngressList is a collection of Ingress.
-
items ([]Ingress), required
Items is the list of Ingress.
-
apiVersion (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/sig-architecture/api-conventions.md#resources
-
kind (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/sig-architecture/api-conventions.md#types-kinds
-
metadata (ListMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Operations
get
read the specified Ingress
HTTP Request
GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (Ingress): OK
401: Unauthorized
get
read status of the specified Ingress
HTTP Request
GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (Ingress): OK
401: Unauthorized
list
list or watch objects of kind Ingress
HTTP Request
GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
Parameters
-
namespace (in path): string, required
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (IngressList): OK
401: Unauthorized
list
list or watch objects of kind Ingress
HTTP Request
GET /apis/networking.k8s.io/v1/ingresses
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (IngressList): OK
401: Unauthorized
create
create an Ingress
HTTP Request
POST /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
Parameters
-
namespace (in path): string, required
-
body: Ingress, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Ingress): OK
201 (Ingress): Created
202 (Ingress): Accepted
401: Unauthorized
update
replace the specified Ingress
HTTP Request
PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
body: Ingress, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Ingress): OK
201 (Ingress): Created
401: Unauthorized
update
replace status of the specified Ingress
HTTP Request
PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
body: Ingress, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (Ingress): OK
201 (Ingress): Created
401: Unauthorized
patch
partially update the specified Ingress
HTTP Request
PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (Ingress): OK
201 (Ingress): Created
401: Unauthorized
patch
partially update status of the specified Ingress
HTTP Request
PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (Ingress): OK
201 (Ingress): Created
401: Unauthorized
delete
delete an Ingress
HTTP Request
DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
Parameters
-
name (in path): string, required
name of the Ingress
-
namespace (in path): string, required
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of Ingress
HTTP Request
DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
Parameters
-
namespace (in path): string, required
-
body: DeleteOptions
-
continue (in query): string
-
dryRun (in query): string
-
fieldSelector (in query): string
-
gracePeriodSeconds (in query): integer
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
Response
200 (Status): OK
401: Unauthorized
5 - IngressClass
apiVersion: networking.k8s.io/v1
import "k8s.io/api/networking/v1"
IngressClass
IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The ingressclass.kubernetes.io/is-default-class
annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
-
apiVersion: networking.k8s.io/v1
-
kind: IngressClass
-
metadata (ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
spec (IngressClassSpec)
Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
IngressClassSpec
IngressClassSpec provides information about the class of an Ingress.
-
controller (string)
Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable.
-
parameters (IngressClassParametersReference)
Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.
IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.
-
parameters.kind (string), required
Kind is the type of resource being referenced.
-
parameters.name (string), required
Name is the name of resource being referenced.
-
parameters.apiGroup (string)
APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-
parameters.namespace (string)
Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster".
-
parameters.scope (string)
Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate.
-
IngressClassList
IngressClassList is a collection of IngressClasses.
-
apiVersion: networking.k8s.io/v1
-
kind: IngressClassList
-
metadata (ListMeta)
Standard list metadata.
-
items ([]IngressClass), required
Items is the list of IngressClasses.
Operations
get
read the specified IngressClass
HTTP Request
GET /apis/networking.k8s.io/v1/ingressclasses/{name}
Parameters
-
name (in path): string, required
name of the IngressClass
-
pretty (in query): string
Response
200 (IngressClass): OK
401: Unauthorized
list
list or watch objects of kind IngressClass
HTTP Request
GET /apis/networking.k8s.io/v1/ingressclasses
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (IngressClassList): OK
401: Unauthorized
create
create an IngressClass
HTTP Request
POST /apis/networking.k8s.io/v1/ingressclasses
Parameters
-
body: IngressClass, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (IngressClass): OK
201 (IngressClass): Created
202 (IngressClass): Accepted
401: Unauthorized
update
replace the specified IngressClass
HTTP Request
PUT /apis/networking.k8s.io/v1/ingressclasses/{name}
Parameters
-
name (in path): string, required
name of the IngressClass
-
body: IngressClass, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
pretty (in query): string
Response
200 (IngressClass): OK
201 (IngressClass): Created
401: Unauthorized
patch
partially update the specified IngressClass
HTTP Request
PATCH /apis/networking.k8s.io/v1/ingressclasses/{name}
Parameters
-
name (in path): string, required
name of the IngressClass
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (IngressClass): OK
201 (IngressClass): Created
401: Unauthorized
delete
delete an IngressClass
HTTP Request
DELETE /apis/networking.k8s.io/v1/ingressclasses/{name}
Parameters
-
name (in path): string, required
name of the IngressClass
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of IngressClass
HTTP Request
DELETE /apis/networking.k8s.io/v1/ingressclasses
Parameters
-
body: DeleteOptions
-
continue (in query): string
-
dryRun (in query): string
-
fieldSelector (in query): string
-
gracePeriodSeconds (in query): integer
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
timeoutSeconds (in query): integer
Response
200 (Status): OK
401: Unauthorized