Difference between revisions of "Spec.IngressClassName"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 +
 +
 +
  
  
Line 14: Line 17:
 
                 port:
 
                 port:
 
                   number: 80
 
                   number: 80
 +
 +
== Multiple rules ==
 +
spec:
 +
  ingressClassName: nginx
 +
  rules:
 +
    - host: [[chart-example.local]]
 +
      http:
 +
        paths:
 +
          - path: /
 +
            pathType: Prefix
 +
            backend:
 +
              service:
 +
                name: grafana
 +
                port:
 +
                  number: 80
 +
    - host: prometheus.chart-example[[.local]]
 +
      http:
 +
        paths:
 +
          - path: /
 +
            pathType: Prefix
 +
            backend:
 +
              service:
 +
                name: prometheus-server
 +
                port:
 +
                  number: 80
 +
 +
  
 
== Changes ==
 
== Changes ==

Revision as of 16:41, 30 November 2023



spec:
  ingressClassName: nginx
  rules:
    - host: yourhost.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: yourservicename
                port:
                  number: 80

Multiple rules

spec:
 ingressClassName: nginx
 rules:
   - host: chart-example.local
     http:
       paths:
         - path: /
           pathType: Prefix
           backend:
             service:
               name: grafana
               port:
                 number: 80
   - host: prometheus.chart-example.local
     http:
       paths:
         - path: /
           pathType: Prefix
           backend:
             service:
               name: prometheus-server
               port:
                 number: 80


Changes

  • Ingresses can specify the class they are associated with by using a new ingressClassName field on Ingresses

Related

See also

Advertising: