diff --git a/docs/toml.md b/docs/toml.md index 5d929ccd6..65867d88f 100644 --- a/docs/toml.md +++ b/docs/toml.md @@ -614,6 +614,37 @@ Labels can be used on containers to override default behaviour: - `traefik.frontend.entryPoints=http,https`: assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`. * `traefik.domain=traefik.localhost`: override the default domain + +## Kubernetes Ingress backend + + +Træfɪk can be configured to use Kubernetes Ingress as a backend configuration: + +```toml +################################################################ +# Kubernetes Ingress configuration backend +################################################################ +# Enable Kubernetes Ingress configuration backend +# +# Optional +# +[kubernetes] + +# Kubernetes server endpoint +# +# When deployed as a replication controller in Kubernetes, +# Traefik will use env variable KUBERNETES_SERVICE_HOST +# and KUBERNETES_SERVICE_PORT_HTTPS as endpoint +# Secure token will be found in /var/run/secrets/kubernetes.io/serviceaccount/token +# and SSL CA cert in /var/run/secrets/kubernetes.io/serviceaccount/ca.crt +# +# Optional +# +# endpoint = "http://localhost:8080" +``` + +You can find here an example [ingress](https://raw.githubusercontent.com/containous/traefik/master/examples/k8s.ingress.yaml) and [replication controller](https://raw.githubusercontent.com/containous/traefik/master/examples/k8s.rc.yaml). + ## Consul backend Træfɪk can be configured to use Consul as a backend configuration: diff --git a/examples/k8s.rc.yaml b/examples/k8s.rc.yaml index 74eb8aa62..9e1c85241 100644 --- a/examples/k8s.rc.yaml +++ b/examples/k8s.rc.yaml @@ -16,7 +16,7 @@ spec: spec: terminationGracePeriodSeconds: 60 containers: - - image: containous/traefik:k8s + - image: containous/traefik name: traefik-ingress-lb imagePullPolicy: Always ports: diff --git a/traefik.sample.toml b/traefik.sample.toml index 6141d1ea0..4275479e1 100644 --- a/traefik.sample.toml +++ b/traefik.sample.toml @@ -323,6 +323,26 @@ # [marathon.TLS] # InsecureSkipVerify = true +################################################################ +# Kubernetes Ingress configuration backend +################################################################ +# Enable Kubernetes Ingress configuration backend +# +# Optional +# +# [kubernetes] + +# Kubernetes server endpoint +# +# When deployed as a replication controller in Kubernetes, +# Traefik will use env variable KUBERNETES_SERVICE_HOST +# and KUBERNETES_SERVICE_PORT_HTTPS as endpoint +# Secure token will be found in /var/run/secrets/kubernetes.io/serviceaccount/token +# and SSL CA cert in /var/run/secrets/kubernetes.io/serviceaccount/ca.crt +# +# Optional +# +# endpoint = "http://localhost:8080" ################################################################ # Consul KV configuration backend