I'm trying to replicate
http:
routers:
adguard-rtr:
rule: "Host(`adguard.{{env "DOMAINNAME_1"}}`)"
entryPoints:
- websecure
middlewares:
- chain-private@file
service: adguard-svc
tls:
certResolver: dns-cloudflare
options: tls-opts@file
adguard-local:
rule: "Host(`adguard.{{env "DOMAINNAME_1"}}`) && (ClientIP(`10.0.10.0/24`) || ClientIP(`192.168.0.0/24`) || ClientIP(`10.0.69.0/24`))"
entryPoints:
- websecure
middlewares:
- chain-private
service: adguard-svc
tls:
certResolver: dns-cloudflare
options: tls-opts@file
priority: 100
services:
adguard-svc:
loadBalancer:
servers:
- url: "http://192.168.0.53"
in k3s.
I have tried using EndpointSlices, Endpoints, Regular services but nothing seems to be working.
I'm new to k3s, but i've had no problem setting up containers in k3s and getting Traefik to proxy them, only external services hosted on other computers on my LAN.
apiVersion: v1
kind: Service
metadata:
name: adguard
spec:
ports:
- port: 80
# targetPort has to match the EndpointSlice port
targetPort: 80
#clusterIP: 192.168.0.53
type: ClusterIP
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: adguard-endpoint # by convention, use the name of the Service
# as a prefix for the name of the EndpointSlice
labels:
# You should set the "kubernetes.io/service-name" label.
# Set its value to match the name of the Service
kubernetes.io/service-name: adguard
addressType: IPv4
ports:
- appProtocol: http
protocol: TCP
port: 80
endpoints:
- addresses:
- "192.168.0.53"
seems like it should work, and I can see the endpoint in kubectl point to where it should, and the service seems to use it, but I either get gateway timeouts, or everything else i've tried gives me 404s