doc: kubernetes CRD provider
Co-authored-by: Jean-Baptiste Doumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
parent
f346251719
commit
c4b7e8f288
9 changed files with 299 additions and 8 deletions
|
@ -26,6 +26,18 @@ The AddPrefix middleware updates the URL Path of the request before forwarding i
|
|||
- "traefik.http.middlewares.add-bar.addprefix.prefix=/bar"
|
||||
```
|
||||
|
||||
??? example "Kubernetes -- Prefixing with /bar"
|
||||
|
||||
```yaml
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: addprefix
|
||||
spec:
|
||||
addprefix:
|
||||
prefix: /bar
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### prefix
|
||||
|
|
|
@ -48,6 +48,45 @@ Pieces of middleware can be combined in chains to fit every scenario.
|
|||
- "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo",
|
||||
```
|
||||
|
||||
??? example "As a Kubernetes Traefik IngressRoute"
|
||||
|
||||
```yaml
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: middlewares.traefik.containo.us
|
||||
spec:
|
||||
group: traefik.containo.us
|
||||
version: v1alpha1
|
||||
names:
|
||||
kind: Middleware
|
||||
plural: middlewares
|
||||
singular: middleware
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: stripprefix
|
||||
spec:
|
||||
stripprefix:
|
||||
prefixes:
|
||||
- /stripit
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ingressroute.crd
|
||||
spec:
|
||||
# more fields...
|
||||
routes:
|
||||
# more fields...
|
||||
middleware:
|
||||
- name: stripprefix
|
||||
```
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
When you declare a middleware, it lives in its `provider` namespace.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue