I tried to host Gitea in K8s with Traefik as Ingreess Controller. There is no problem with the https-clone-command, but the ssh-clone command always ends at the K8s host, not in the Traefik or Gitea Pod.
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
labels:
app: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.21.0
ports:
- containerPort: 3000
name: gitea
- containerPort: 22
name: gitea-ssh
volumeMounts:
- mountPath: /data
name: gitea-data
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-pvc
---
kind: Service
apiVersion: v1
metadata:
name: gitea-service
namespace: gitea
spec:
selector:
app: gitea
ports:
- name: gitea-http
port: 3000
---
kind: Service
apiVersion: v1
metadata:
name: gitea-ssh-service
namespace: gitea
spec:
selector:
app: gitea
ports:
- name: gitea-ssh
port: 22
---
kind: IngressRouteTCP
apiVersion: traefik.io/v1alpha1
metadata:
name: gitea-ssh-ingress
namespace: gitea
spec:
entryPoints:
- ssh
routes:
- match: HostSNI(`*`)
kind: Rule
services:
- name: gitea-ssh-service
port: 22
IngressRouteTCP doesn't work as kind for it, but if I use just an IngressRoute, it is recognized as http in the dashboard. Does anyone have an idea how to solve this problem?