Skip to content

Instantly share code, notes, and snippets.

@jmorenoamor
Last active March 13, 2023 09:51
Show Gist options
  • Save jmorenoamor/56509b13f1bd30104305f8fde49cf928 to your computer and use it in GitHub Desktop.
Save jmorenoamor/56509b13f1bd30104305f8fde49cf928 to your computer and use it in GitHub Desktop.
Traefik

Public dashboard ingress route

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik-public
  name: traefik-public-dashboard-ingress
  namespace: ingress
spec:
  entryPoints:
    - websecure
  routes:
    - kind: Rule
      match: Host(`traefik.private.local`)
      services:
        - kind: TraefikService
          name: api@internal

Public dashboard ingress route throug private ingress class

apiVersion: v1
kind: Service
metadata:
  name: traefik-public-dashboard
  namespace: ingress
spec:
  ports:
    - name: traefik
      protocol: TCP
      port: 9000
      targetPort: traefik
  selector:
    app.kubernetes.io/instance: traefik-public-ingress
    app.kubernetes.io/name: traefik
  type: ClusterIP
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik-private
  name: traefik-public-dashboard-ingress
  namespace: ingress
spec:
  entryPoints:
    - websecure
  routes:
    - kind: Rule
      match: Host(`traefik.private.local`)
      services:
        - kind: Service
          namespace: ingress
          name: traefik-public-dashboard
          port: traefik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment