--- kind: Deployment apiVersion: apps/v1 metadata: name: gopy labels: app: gopy spec: replicas: 3 selector: matchLabels: app: gopy template: metadata: labels: app: gopy spec: containers: - name: gopy image: docker.dezendorf.net/gopy:4fbf8ff ports: - name: web containerPort: 5000 --- apiVersion: v1 kind: Service metadata: name: gopy spec: type: ClusterIP ports: - name: web port: 5000 selector: app: gopy --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: gopy-ingress-route namespace: default spec: entryPoints: - web routes: - match: (Host(`go`)||Host(`go.dezendorf.net`)) && Path(`/list`) kind: Rule middlewares: - name: gopyhttpsgofqdn services: - name: gopy port: 5000 - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/edit`) kind: Rule middlewares: - name: gopyhttpsgofqdn services: - name: gopy port: 5000 - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/add`) kind: Rule middlewares: - name: gopyhttpsgofqdn services: - name: gopy port: 5000 - match: ((Host(`go`)||Host(`go.dezendorf.net`))) && Path(`/{url:.*}/delete`) kind: Rule middlewares: - name: gopyhttpsgofqdn services: - name: gopy port: 5000 - match: ((Host(`go`)||Host(`go.dezendorf.net`))||Host(`go.dezendorf.com`)) kind: Rule services: - name: gopy port: 5000 --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: gopy-websecure-route namespace: default spec: entryPoints: - websecure routes: - match: ((Host(`go.dezendorf.net`)||Host(`go.dezendorf.net`))) kind: Rule middlewares: - name: authelia services: - name: gopy port: 5000 tls: certResolver: myresolver --- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: gopyhttpsgofqdn spec: redirectRegex: regex: "^http(s)?://(go(.dezendorf.net)?)/(.+)?$" replacement: "https://go.dezendorf.net/${4}"