submariner-io / submariner

Networking component for interconnecting Pods and Services across Kubernetes clusters.

Home Page:https://submariner.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When subctl joins the cluster, there are multiple network cards. How to specify the network card IP?

luoMonkeyKing opened this issue · comments

What happened:

My virtual machine has two network cards. When subctl join, the submariner uses a network card IP that is not connected to the network, causing the pod network between the two clusters to be blocked.

What you expected to happen:
The ENDPOINT IP of the cluster can be modified, or the network card IP can be specified when subctl join

How to reproduce it (as minimally and precisely as possible):

subctl  join broker-info.subm --clusterid  cluster0 --clustercidr 100.68.0.0/16,11.16.0.0/16  --natt=false --cable-driver vxlan --health-check=false
kubectl label nodes cluster0 submariner.io/gateway=true

Anything else we need to know?:
The 10.0.2.15 network card is blocked. The k8s cluster uses another network card with an IP address of 192.168.10.17. How to change the endpoint IP to 192.168.10.17?

GATEWAY   CLUSTER    REMOTE IP   NAT   CABLE DRIVER   SUBNETS                                    STATUS      RTT avg.   
k8s01     cluster1   10.0.2.15   no    vxlan          10.96.0.0/12, 100.64.0.0/16, 10.16.0.0/1   connected              

 ✓ Showing Endpoints
CLUSTER    ENDPOINT IP   PUBLIC IP       CABLE DRIVER   TYPE     
cluster0   10.0.2.15             x.x.x.x   vxlan          local  

Environment:

  • Diagnose information (use subctl diagnose all):
  • Gather information (use subctl gather):
  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:

Thanks for reaching out @luoMonkeyKing,

Submariner discovers two IP addresses for each endpoint, private and public - you can find more details here

In your case since NAT is disabled, private IP is used to represent the endpoint.

PrivateIP is IP assigned to one of the interfaces on the gateway node, in case of multiple interfaces/IP addresses Submariner chooses the source IP used when we connect to 'external world' by connecting to DNS @ 8.8.8.8 .

So, you can update routing table on GW node to control privateIP chosen by Submariner.