WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

New Lecture on Ingress Classes #26

@ivorscott

Description

@ivorscott

Add lecture or new section for ingress classes.

Ingress classes

Ingresses can be implemented by different controllers, often with different configuration. Each Ingress should specify a class, a reference to an IngressClass resource that contains additional configuration including the name of the controller that should implement the class.

https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class

Default IngressClass

You can mark a particular IngressClass as default for your cluster. Setting the ingressclass.kubernetes.io/is-default-class annotation to true on an IngressClass resource will ensure that new Ingresses without an ingressClassName field specified will be assigned this default IngressClass.

https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class

DefaultBackend

An Ingress with no rules sends all traffic to a single default backend. The defaultBackend is conventionally a configuration option of the Ingress controller and is not specified in your Ingress resources.

If none of the hosts or paths match the HTTP request in the Ingress objects, the traffic is routed to your default backend.

spec:
  defaultBackend:
    service:
      name: nginx
      port:
        number: 80

Explain DefaultBackend Warning

If you don't have a defaultBackend on the ingress resources or the ingress controller you will see a warning when inspecting the ingress resources.

kubectl describe ingress 

Name: demo-app
Namespace: default
Address:
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host Path Backends

nginx/kubernetes-ingress#966

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecation updateA fix for something that is outdated but not broken yetenhancementNew feature or request

    Projects

    Status

    Enhancements 💡

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions