Add traefik config file to route to services out of cluster
This commit is contained in:
parent
9d1c4d07f5
commit
b5965274a4
4 changed files with 38 additions and 2 deletions
|
@ -2,4 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||
kind: Kustomization
|
||||
resources:
|
||||
- traefik-default-cert.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: traefik-additional-configs
|
||||
namespace: kube-system
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
files:
|
||||
- traefik/external-services.yaml
|
||||
|
|
|
@ -10,7 +10,7 @@ spec:
|
|||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: traefik-default
|
||||
name: default
|
||||
namespace: kube-system
|
||||
spec:
|
||||
issuerRef:
|
||||
|
|
21
k8s/system/traefik/external-services.yaml
Normal file
21
k8s/system/traefik/external-services.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
http:
|
||||
routers:
|
||||
minio:
|
||||
entryPoints:
|
||||
- websecure
|
||||
rule: "Host(`storage.home.finn.io`)"
|
||||
service: minio
|
||||
minio-console:
|
||||
entryPoints:
|
||||
- websecure
|
||||
rule: "Host(`minio-console.home.finn.io`)"
|
||||
service: minio-console
|
||||
services:
|
||||
minio:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://minio:9000/"
|
||||
minio-console:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://minio:9001/"
|
|
@ -5,6 +5,8 @@ metadata:
|
|||
namespace: kube-system
|
||||
spec:
|
||||
valuesContent: |-
|
||||
deployment:
|
||||
replicas: 2
|
||||
ports:
|
||||
web:
|
||||
proxyProtocol:
|
||||
|
@ -17,3 +19,10 @@ spec:
|
|||
trustedIPs:
|
||||
- 10.5.1.245/32
|
||||
- 10.42.0.0/16 # traffic getting redirected from other nodes
|
||||
additionalArguments:
|
||||
- --providers.file.directory=/file-configs
|
||||
- --providers.file.watch=true
|
||||
volumes:
|
||||
- name: traefik-additional-configs
|
||||
mountPath: /file-configs
|
||||
type: configMap
|
||||
|
|
Loading…
Reference in a new issue