I am unable to connect to my Jenkins master (running outside the cluster) from a pod running on the same machine as the Jenkins master instance.
When the pods run from another host machine, ping/connection works fines.
I'm using flannel. The only thing I can see is the this host IP address is in the cni.conf file configured in the exception list for OutBoundNAT endpoint Policy.
How can I run a Jenkins Agent pod on the same host as the Jenkins master if I cannot connect the IP of the host from the pod it's running on?
Thanks,
You need to assign the pods to that specific node.
There are so many ways to do that but you can test by using NodeSelector.
Example:
Which your node should have similar key and value in the labels.
To check nodes labels you can use:
To add a label to node:
Example:
for full and different examples you can check this link.
https://gist.github.com/devops-school/3da18faede22b18ac7013c404bc10740
Goodluck!