Difference between revisions of "Kind: Middleware"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<pre> apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: stripprefix namespace: foo spec: stripPrefix: prefixes: - /stripit --- apiVer...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lc}}
 +
https://doc.traefik.io/traefik/v2.0/routing/providers/kubernetes-crd/
 
<pre>
 
<pre>
 
apiVersion: traefik.containo.us/v1alpha1
 
apiVersion: traefik.containo.us/v1alpha1
Line 31: Line 33:
  
 
</pre>
 
</pre>
 +
 +
== See also ==
 +
* {{traefik}}
 +
 +
[[Category:traefik]]

Latest revision as of 14:03, 18 July 2024

https://doc.traefik.io/traefik/v2.0/routing/providers/kubernetes-crd/

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: stripprefix
  namespace: foo

spec:
  stripPrefix:
    prefixes:
      - /stripit

---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: ingressroutebar

spec:
  entryPoints:
    - web
  routes:
  - match: Host(`bar.com`) && PathPrefix(`/stripit`)
    kind: Rule
    services:
    - name: whoami
      port: 80
    middlewares:
    - name: stripprefix
      namespace: foo

See also[edit]

Advertising: