Istio break SFTP communication

Viewed 362

I have a simple stateful with SFTP features and a second service try to connect to it.

When ISTIO is enabled, the connection is closed by the sftp service. We can find this log:

Bad protocol version identification '\026\003\001'

The routing is OK.

The service:

apiVersion: v1
kind: Service
metadata:
  name: foo
  namespace: bar
spec:
  ports:
    - port: 22
      targetPort: 22
      protocol: TCP
      name: tcp-sftp
  selector:
    app.kubernetes.io/instance: foo-bar

I try to add a VirtualService with no luck:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: foo-bar-destination-virtualservice
  namespace: bar
spec:
  hosts:
    - foo.bar.svc.cluster.local
  tcp:
    - match:
        - port: 22
      route:
        - destination:
            host: foo.bar.svc.cluster.local
            port:
              number: 22

The workaround is to disabled the sidecar on the sftp pod for now:

sidecar.istio.io/inject: "false"
1 Answers

It seems Envoy proxy (and Istio by proxy) does not support SFTP protocol (referecce).
Your workaround is currently the only way to make it work.

If you want your auto-discovered services in the mesh to route/access your SFTP service, you can additionally create ServiceEntry pointing to it.

Related