Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: Kubernetes - Add proxy example with Traefik #3865

@cfis

Description

@cfis

Subject

I would like to configure a not documented mail server use case

Description

This could be nice to add to the Kubernetes documentation page.

This is an example of configuring Traefik as a reverse proxy that was taken from a PR request (docker-mailserver/docker-mailserver-helm#62).

Running behind Traefik as reverse proxy

Setup according to the official DMS guide with traefik.

values.yaml

service:
  type: ClusterIP
  behind_proxy: true
  proxy_trusted_networks: "10.42.0.0/16"

Using the following TCP Route.

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: smtp
  namespace: mail
spec:
  entryPoints:
    - smtp
  routes:
    - match: HostSNI(`*`)
      services:
        - name: mail-docker-mailserver
          namespace: mail
          port: 25
          proxyProtocol:
            version: 1
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: smtps
  namespace: mail
spec:
  entryPoints:
    - smtps
  tls:
    passthrough: true
  routes:
    - match: HostSNI(`*`)
      services:
        - name: mail-docker-mailserver
          namespace: mail
          port: 465
          proxyProtocol:
            version: 1
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: imaps
  namespace: mail
spec:
  entryPoints:
    - imaps
  tls:
    passthrough: true
  routes:
    - match: HostSNI(`*`)
      services:
        - name: mail-docker-mailserver
          namespace: mail
          port: 10993
          proxyProtocol:
            version: 2
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: submission
  namespace: mail
spec:
  entryPoints:
    - submission
  routes:
    - match: HostSNI(`*`)
      services:
        - name: mail-docker-mailserver
          namespace: mail
          port: 587
          proxyProtocol:
            version: 1

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions