From 903c63ac13f86cc85cd7b62e54e7bec5f232f628 Mon Sep 17 00:00:00 2001 From: Damien Duportal Date: Fri, 13 Dec 2019 10:36:04 +0100 Subject: [PATCH] add a documentation example for dashboard and api for kubernetes CRD --- .../operations/include-api-examples.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/content/operations/include-api-examples.md b/docs/content/operations/include-api-examples.md index b16da30f6..18fa46b65 100644 --- a/docs/content/operations/include-api-examples.md +++ b/docs/content/operations/include-api-examples.md @@ -19,6 +19,28 @@ deploy: - "traefik.http.services.dummy-svc.loadbalancer.server.port=9999" ``` +```yaml tab="Kubernetes CRD" +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: traefik-dashboard +spec: + routes: + - match: Host(`traefik.domain.com`) + kind: Rule + services: + - name: api@internal + kind: TraefikService +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: auth +spec: + basicAuth: + secret: secretName # Kubernetes secret named "secretName" +``` + ```yaml tab="Consul Catalog" # Dynamic Configuration - "traefik.http.routers.api.rule=Host(`traefik.domain.com`)"