0

I have flux, nginx, gitlab pod running in my kubernetes cluster on AWS. Nginx runs as a load balancer/reverse proxy,while gitlab runs a node port( and only gitlab is behing nginx).Gitlab and flux are in different namespaces. Now i want to ssh from the flux pod into gitlab. Flux is installed via helm charts. Prior to installing flux i run - ssh-keyscan {{ git_host }} > flux_known_hosts and refer to this in the installer command. since my git_host is a loadbalancer url, ssh-keyscan does not work as it cannot resolve the ELB url.

However on the other hand - git clone ssh://git@gitlab.ethan.svc.cluster.local:222/root/automation.git works when i run this command from the flux pod. Is there any way to get the below command to work from the flux pod(using the elb url and not the gitlab service name) -

ssh://git@aa82ee1b284b0464bb1353bd2fbccdd2-1957457895.ca-central-1.elb.amazonaws.com:root/automation.git

I have tried opening ports on the Elb but that does not seem to work.

Dilip
  • 365
  • 1
  • 6
  • 18
  • Is there a reason why you dont want to expose gitlab using ELB network LB? Can you share your Nginx configuration? Can you check if you are able to reach application using `Host:NodePort`? – PjoterS Oct 02 '20 at 10:51
  • @PjoterS so we few have a few more tools that are behind nginx and is like the only entry point and so tha ts how our overall setup is. My nginx conf is like this - `server { listen 5011; resolver 110.61.0.11; set $upstream_fluxcd gitlab.ethan.svc.cluster.local:222;`, I have opened port 5011 on my ELB, i am able to clone using the host:nodeport from the flux pod. – Dilip Oct 03 '20 at 17:24

0 Answers0