(Sftpgo) Send traffic to port 22 on Kubernetes

Hi All, Im facing an issue in connecting to the sftpgo application hosted on kubernetes. Does Kubernetes block sftpgo on its default port 22.
If yes how do i send traffic to port 22 on Kubernetes.
Most of the traffic goes through port 80, and then the ocnfigured services should send it to correct container and port.

The ingress is as below:

kind: Ingress
metadata:
  name: sftp-access
spec:
  rules:
    - host: sftpgo-connect-test
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: sftpgoaccess
                port:
                  number: 22
---
apiVersion: v1
kind: Service
metadata:
  name: sftpgoaccess
  namespace: default
spec:
  ports:
    - name: sftp
      port: 2022
      protocol: TCP
      targetPort: sftp

Any help in this regard is appreciated.
Thanks.

Hi:

I don’t know about sftpgo, but it seems to be some kind of FTP server.
Ingress only exposes HTTP and HTTPS (see Ingress | Kubernetes), so it will not manage FTP connections.

Best regards,

Xavi

Hi Xavi,

Thanks for your reply. I’ll probably try to run it in a different docker, will post the update here.

Regards,
Sunil Menon

Don’t need Ingress.
Declare Service with type: LoadBalancer
or declare Service with type: NodePort

you can use gatewayAPI for this it support tcp