[k8s] How to point to a sftp server in a different namespace?
rjbaat opened this issue · 2 comments
Hi all,
I have a SFTP container running on my k8s cluster. Now I want to map sshpiper to it with the pipe manifest.
I already tried this to use the dns to map the ssh pipe to a different service in a different namespace:
apiVersion: pockost.com/v1beta1
kind: SshPipe
metadata:
name: sftp-4
spec:
users:
- sftp-4
target:
name: sftp-4.sftp-4.svc.cluster.local
But it looks like I get this errors when trying to connect:
connection from xxx.xxx.xxx.xxx:29578 establishing failed reason: dial tcp: lookup sftp-4.sftp-4.svc.cluster.local.sshpiper on 10.245.0.10:53: no such host
Has anyone an idea what is going on here and how to solve it?
Could it be that it will always lookup a service within the same namespace?
Is there an option to point to a specific service in the cluster with the dns like: sftp-4.sftp-4.svc.cluster.local
?
Or maybe with an extra field in the SshPipe manifest like: pipe.Spec.Target.Namespace
ah nvm. I had to put the pipe manifest in the other namespace and then it gets pointed correctly :)