79 lines
1.6 KiB
YAML
79 lines
1.6 KiB
YAML
apiVersion: v1
|
|
data:
|
|
conf.toml: |
|
|
# Dynamic configuration
|
|
[http]
|
|
[http.routers]
|
|
[http.routers.my-router]
|
|
rule = "PathPrefix(`/`)"
|
|
service = "beetroot-proxy"
|
|
|
|
[http.services]
|
|
[http.services.beetroot-proxy.loadBalancer]
|
|
[[http.services.beetroot-proxy.loadBalancer.servers]]
|
|
url = "http://beetroot.default.svc.cluster.local:8080"
|
|
traefik.toml: |
|
|
# Static configuration
|
|
[entryPoints]
|
|
[entryPoints.web]
|
|
address = ":30008"
|
|
|
|
[providers]
|
|
[providers.file]
|
|
filename = "/etc/traefik/conf.toml"
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: traefikconfig
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: traefikproxy
|
|
name: traefikproxy
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 30008
|
|
protocol: TCP
|
|
targetPort: 30008
|
|
nodePort: 30008
|
|
selector:
|
|
app: traefikproxy
|
|
type: NodePort
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: traefikproxy
|
|
name: traefikproxy
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: traefikproxy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: traefikproxy
|
|
spec:
|
|
containers:
|
|
- image: traefik
|
|
name: traefikproxy
|
|
ports:
|
|
- containerPort: 30008
|
|
name: http
|
|
volumeMounts:
|
|
- mountPath: ./etc/traefik
|
|
name: config
|
|
volumes:
|
|
- configMap:
|
|
items:
|
|
- key: traefik.toml
|
|
path: traefik.toml
|
|
- key: conf.toml
|
|
path: conf.toml
|
|
name: traefikconfig
|
|
name: config
|