Ingress
apiVersion: networking.k8s.io/v1
import "k8s.io/api/networking/v1"
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 ()
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec ()
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 ()
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 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.tls ([]IngressTLS)
Atomic: will be replaced during a merge
tls 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 merge
hosts 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.
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 (IngressLoadBalancerStatus)
loadBalancer contains the current status of the load-balancer.
IngressLoadBalancerStatus represents the status of a load-balancer.
loadBalancer.ingress ([]IngressLoadBalancerIngress)
ingress 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 merge
ports provides information about the ports exposed by this LoadBalancer.
IngressPortStatus represents the error condition of a service port
loadBalancer.ingress.ports.port (int32), required
port is the port number of the ingress port.
loadBalancer.ingress.ports.protocol (string), required
protocol 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 names
- cloud provider specific error values must have names that comply with the format foo.example.com/CamelCase.
IngressList is a collection of Ingress.
items ([]), 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:
metadata (ListMeta)
Standard object’s metadata. More info:
Operations
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 (): OK
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
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
Response
200 (): OK
401: Unauthorized
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
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
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: , required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
Response
200 (): OK
201 (Ingress): Created
202 (): 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
fieldValidation (in query): string
pretty (in query): string
Response
200 (Ingress): OK
201 (): Created
401: Unauthorized
HTTP Request
PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status
Parameters
name (in path): string, required
name of the Ingress
body: Ingress, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
Response
200 (Ingress): OK
201 (): 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
fieldValidation (in query): string
force (in query): boolean
pretty (in query): string
Response
200 (): 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: , required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
force (in query): boolean
pretty (in query): string
Response
200 (Ingress): OK
201 (): Created
401: Unauthorized
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 (): 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
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
Response
200 (Status): OK