good day. i have k8s cluster and gitlab installed on dedicated server (as typical application on real OS) i have ingress on k8s which route traffic by host address to gitlab via externalName service
no i need to give access to ssh, so i create service without selector and coresponding endpoint:
apiVersion: v1
kind: Service
metadata:
name: gitlab-service-ssh
namespace: host
spec:
type: NodePort
ports:
- protocol: TCP
port: 22
nodePort: 30222
---
apiVersion: v1
kind: Endpoints
metadata:
name: gitlab-service-ssh
namespace: host
subsets:
- addresses:
- ip: 192.168.0.24
ports:
- port: 22
i can access to ssh from k8s cluster node via
git clone ssh://git@git.xxxxxx:30222/XXXXX
and it is work correctly
by if i try to access from any lan computer i receive
ssh: connect to host git.xxxxx port 30222: Resource temporarily unavailable
there is no any active firewall or other service on this port (i try to use different port - same result)
so i dont understand there is my fault.
i use k8s of version 1.16 on bare metal with metallb as load balance, host machine under Ubuntu 18.04