add traefik external service

This commit is contained in:
James Turland 2023-12-03 23:32:13 +00:00
parent 5141781330
commit 98092c1dc0
3 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,16 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: default-headers
namespace: default
spec:
headers:
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 15552000
customFrameOptionsValue: SAMEORIGIN
customRequestHeaders:
X-Forwarded-Proto: https

View file

@ -0,0 +1,30 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: proxmox
namespace: default
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`www.proxmox.jimsgarage.co.uk`)
kind: Rule
services:
- name: proxmox
port: 8006
scheme: https
passHostHeader: true
- match: Host(`proxmox.jimsgarage.co.uk`)
kind: Rule
services:
- name: proxmox
port: 8006
scheme: https
passHostHeader: true
middlewares:
- name: default-headers
tls:
secretName: jimsgarage-tls

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: proxmox
namespace: default
spec:
externalName: 192.168.200.75
type: ExternalName
ports:
- name: websecure
port: 8006
targetPort: 8006