nokia / danm

TelCo grade network management in a Kubernetes cluster
BSD 3-Clause "New" or "Revised" License
373 stars 81 forks source link

Expose the Danm service created on additional pod interface to outside the kubernetes cluster #229

Closed sriramec closed 4 years ago

sriramec commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: support

Uncomment only one, leave it on its own line:

bug feature

What happened: Hi,

I have created two danmNet networks, one is mgmtNetwork and other is dataNetwork. MgmtNetwork internally uses flannel for interface creation(eth0) and ipam. dataNetwork uses ipvlan cni plugin for interface creation(ex: net1) and danm's in built ipam for ip address assignment. I have also defined two services a) 1st service - to access the pod over mgmt interface(eth0). b) 2nd service - to access the pod over data network ipvlan interface(net1). 2nd service is a headless, selector less service as recommended by Danm with the annotations having "danm.k8s.io/network" and "danm.k8s.io/selector" to select the pods my question is, Is it possible to access the 2nd type of service from outside the k8s cluster. If yes, any suggestions on how to do it.

Regards, Sriram

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

Levovar commented 4 years ago

The headless & selectorless Services are for service discovery purpose, not for service routing. Kube-proxy ignores them, and anyway kube-proxy way does not work with IPVLAN Depending on the VLAN and CIDR you used for your IPVLAN network the interface can be directly exposed if an externally routable, and configured VLAN/CIDR is configured for the network. If the network is not externally routable, you need to use a load balancer. The load balancer internally needs to have L3 routing set-up to the IPVLAN CIDR.

Levovar commented 4 years ago

@sriramec any additional questions, or did above clarify?

sriramec commented 4 years ago

Thanks Levovar for your replies. Yes, it clarified my concerns. Thanks a lot.