diff --git a/traefik-lb/deployment.yaml b/traefik-lb/deployment.yaml new file mode 100644 index 0000000..c13d52b --- /dev/null +++ b/traefik-lb/deployment.yaml @@ -0,0 +1,37 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: traefik + labels: + app: traefik + +spec: + replicas: 1 + selector: + matchLabels: + app: traefik + template: + metadata: + labels: + app: traefik + spec: + serviceAccountName: traefik-ingress-controller + containers: + - name: traefik + image: traefik:v2.7 + args: + - --log.level=DEBUG + - --api + - --api.insecure + - --entrypoints.web.address=:80 + - --entrypoints.udpep.address=:25565/udp + - --providers.kubernetescrd + ports: + - name: web + containerPort: 80 + - name: admin + containerPort: 8080 + - name: udpep + containerPort: 25565 + + diff --git a/traefik-lb/service-account.yaml b/traefik-lb/service-account.yaml new file mode 100644 index 0000000..8a31290 --- /dev/null +++ b/traefik-lb/service-account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: traefik-ingress-controller diff --git a/traefik-lb/service.yaml b/traefik-lb/service.yaml new file mode 100644 index 0000000..f801c4a --- /dev/null +++ b/traefik-lb/service.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: Service +metadata: + name: traefi +spec: + type: LoadBalancer + selector: + app: traefik + ports: + - protocol: TCP + port: 80 + name: web + targetPort: 80 + - protocol: TCP + port: 8080 + name: admin + targetPort: 8080 + +--- +apiVersion: v1 +kind: Service +metadata: + name: traefikudp +spec: + type: LoadBalancer + selector: + app: traefik + ports: + - protocol: UDP + port: 25565 + name: udpep + targetPort: 25565