# Ingress

IngressIngress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend.apiVersion: networking.k8s.io/v1import "k8s.io/api/networking/v1"IngressIngress 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/v1kind: Ingressmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (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-statusstatus (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-statusIngressSpecIngressSpec 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 an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the kubernetes.io/ingress.class annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.rules ([]IngressRule)Atomic: will be replaced during a mergerules is 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), requiredAtomic: will be replaced during a mergepaths is 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), requiredbackend defines the referenced service endpoint to which the traffic will be forwarded to.rules.http.paths.pathType (string), requiredpathType 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 mergetls represents the 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 mergehosts is 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.IngressBackendIngressBackend 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), requiredname 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".IngressStatusIngressStatus describe the current state of the Ingress.loadBalancer (IngressLoadBalancerStatus)loadBalancer contains the current status of the load-balancer.IngressLoadBalancerStatus represents the status of a load-balancer.loadBalancer.ingress ([]IngressLoadBalancerIngress)Atomic: will be replaced during a mergeingress is a list containing ingress points for the load-balancer.IngressLoadBalancerIngress represents the status of a load-balancer ingress point.loadBalancer.ingress.hostname (string)hostname is set for load-balancer ingress points that are DNS based.loadBalancer.ingress.ip (string)ip is set for load-balancer ingress points that are IP based.loadBalancer.ingress.ports ([]IngressPortStatus)Atomic: will be replaced during a mergeports provides information about the ports exposed by this LoadBalancer.IngressPortStatus represents the error condition of a service portloadBalancer.ingress.ports.port (int32), requiredport is the port number of the ingress port.loadBalancer.ingress.ports.protocol (string), requiredprotocol is the protocol of the ingress port. 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 namescloud provider specific error values must have names that comply with the format foo.example.com/CamelCase.IngressListIngressList is a collection of Ingress.items ([]Ingress), requireditems 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#resourceskind (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-kindsmetadata (ListMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataOperationsget read the specified IngressHTTP RequestGET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}Parametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (Ingress): OK401: Unauthorizedget read status of the specified IngressHTTP RequestGET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/statusParametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (Ingress): OK401: Unauthorizedlist list or watch objects of kind IngressHTTP RequestGET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingressesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (IngressList): OK401: Unauthorizedlist list or watch objects of kind IngressHTTP RequestGET /apis/networking.k8s.io/v1/ingressesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (IngressList): OK401: Unauthorizedcreate create an IngressHTTP RequestPOST /apis/networking.k8s.io/v1/namespaces/{namespace}/ingressesParametersnamespace (in path): string, requirednamespacebody: Ingress, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Ingress): OK201 (Ingress): Created202 (Ingress): Accepted401: Unauthorizedupdate replace the specified IngressHTTP RequestPUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}Parametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacebody: Ingress, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Ingress): OK201 (Ingress): Created401: Unauthorizedupdate replace status of the specified IngressHTTP RequestPUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/statusParametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacebody: Ingress, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Ingress): OK201 (Ingress): Created401: Unauthorizedpatch partially update the specified IngressHTTP RequestPATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}Parametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacebody: Patch, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationforce (in query): booleanforcepretty (in query): stringprettyResponse200 (Ingress): OK201 (Ingress): Created401: Unauthorizedpatch partially update status of the specified IngressHTTP RequestPATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/statusParametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacebody: Patch, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationforce (in query): booleanforcepretty (in query): stringprettyResponse200 (Ingress): OK201 (Ingress): Created401: Unauthorizeddelete delete an IngressHTTP RequestDELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}Parametersname (in path): string, requiredname of the Ingressnamespace (in path): string, requirednamespacebody: DeleteOptionsdryRun (in query): stringdryRungracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentialpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyResponse200 (Status): OK202 (Status): Accepted401: Unauthorizeddeletecollection delete collection of IngressHTTP RequestDELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingressesParametersnamespace (in path): string, requirednamespacebody: DeleteOptionscontinue (in query): stringcontinuedryRun (in query): stringdryRunfieldSelector (in query): stringfieldSelectorgracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentiallabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondsResponse200 (Status): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.