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:

https://preview.redd.it/q4mru9fz0s1c1.png?width=1006&format=png&auto=webp&s=1934bca3df4cc2b46326dcc091516330d8e8b1bc

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?

  • clintkev251@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Change the name of the port in your service to HTTP, or explicitly set the scheme as HTTP. From the Traefik docs:

    There are 3 ways to configure the backend protocol for communication between Traefik and your pods:
    
    Setting the scheme explicitly (http/https/h2c)
    
    Configuring the name of the kubernetes service port to start with https (https)
    
    Setting the kubernetes service port to use port 443 (https)
    
    If you do not configure the above, Traefik will assume an http connection.
    

    https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-traefikservice