Kubernetes + traefik 2 gitlab route ssh port

Hello ,

For couple of days I'm trying to figure out a way to access gitlab hosted on a k8s cluster

So, kubernetes 1.23.13; traefik 2.8.7
Kubernetes cluster up and running

access gitlab over HTTPS
IngressRouteTCP

apiVersion: v1
items:
- apiVersion: traefik.containo.us/v1alpha1
  kind: IngressRouteTCP
  metadata:
    annotations:
      ingress.kubernetes.io/ssl-passthrough: "true"
    name: gitlab-ingress
    namespace: gitlab
  spec:
    entryPoints:
    - websecure
    routes:
    - kind: Rule
      match: HostSNI(`*`)
      priority: 1
      services:
      - name: gitlab-ce
        port: 443
    tls:
      certResolver: gitlab
      passthrough: true

IngressRouteTCP for ssh

- apiVersion: traefik.containo.us/v1alpha1
  kind: IngressRouteTCP
  metadata:
    name: gitlab-ssh
    namespace: gitlab
  spec:
    entryPoints:
    - gitlab-ssh
    routes:
    - kind: Rule
      match: HostSNI(`*`)
      priority: 2
      services:
      - name: gitlab-ce
        port: 22

Since traefik was already installed, I had to patch the traefik deployment to create gitlab-ssh entrypoint:

spec:
  containers:
  - args:
    - --global.checknewversion
    - --global.sendanonymoususage
    - --entrypoints.metrics.address=:9100/tcp
    - --entrypoints.traefik.address=:9000/tcp
    - --entrypoints.web.address=:8000/tcp
    - --entrypoints.websecure.address=:8443/tcp
    - --entrypoints.gitlab-ssh.address=:2222/tcp
        ports:
        - containerPort: 9100
          name: metrics
          protocol: TCP
        - containerPort: 9000
          name: traefik
          protocol: TCP
        - containerPort: 8000
          name: web
          protocol: TCP
        - containerPort: 8443
          name: websecure
          protocol: TCP
        - containerPort: 2222
          name: gitlab-ssh

So , as I have said, gitlab is accessible over HTTPS

but git clone ssh://gitlab-domain:2222/project/prj1.git fails ... :frowning:

Am I doing something wrong, do I miss something ?!