I have an radarr instance running on my kubernetes. I have configured the IngressRoute to point towards the http port of radarr (Port 7878) but traefik is tring to redirect like an https to an https endpoint that does not exists. See the following:
My deployment yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: radarr
namespace: media
spec:
replicas: 1
selector:
matchLabels:
app: radarr
template:
metadata:
labels:
app: radarr
spec:
containers:
- name: radarr
image:
cr.hotio.dev/hotio/radarr:latest
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "EST"
ports:
- containerPort: 7878
name: http
protocol: TCP
volumeMounts:
- name: media
mountPath: /config
subPath: configs/radarr
- name: dados
mountPath: /dados
subPath: downloads/transmission
- name: data
mountPath: /data
subPath: medias/movies
volumes:
- name: media
persistentVolumeClaim:
claimName: pvc-radarr
- name: dados
persistentVolumeClaim:
claimName: pvc-dados
- name: data
persistentVolumeClaim:
claimName: pvc-data
My Service yaml:
apiVersion: v1
kind: Service
metadata:
name: radarr
namespace: media
spec:
selector:
app: radarr
ports:
- name: https
targetPort: 7878
port: 7878
type: ClusterIP
My Ingress yaml:
apiVersion:
traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: radarr-ingress
namespace: media
spec:
entryPoints:
- web
routes:
- match: Host(\
radarr2.domain.com`)`
kind: Rule
services:
- name: radarr
port: 7878
Here is the result on the traefik dashboard:
See that on the servers URL it’s point to an HTTPS url, my radarr does not have https configured, so i got an “Internal Server Error” when i try toi access my exposed URL.
On Traefik logs i got the error: time=“2023-11-21T22:19:26Z” level=debug msg=“‘500 Internal Server Error’ caused by: tls: first record does not look like a TLS handshake”
Thats because traefik is trying to redirect an https trafic to an http endpoint.
I realy dont know what i did wrong and how to fix this.
Can anyone help me?
Change the name of the port in your service to HTTP, or explicitly set the scheme as HTTP. From the Traefik docs:
https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-traefikservice