--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-network+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-network@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-sig-network.
For more options, visit https://groups.google.com/d/optout.
Tim
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-network+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-network@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-ne...@googlegroups.com.
To post to this group, send email to kubernetes-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-sig-network.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-ne...@googlegroups.com.
To post to this group, send email to kubernetes-...@googlegroups.com.
I don't have all the details, but it doesn't sound that tricky to me.
Having a VIP as a local address is a pretty well-understood technique,
and static(ish) load-balancer routes are not rocket science.
Sure, it's a particular implementation, but I don't think what they
are doing is out of bounds - maybe I am too lax? Assuming NAT in all
cases seems too restrictive.
On Wed, Jan 11, 2017 at 9:15 AM, Guru Shetty <gu...@ovn.org> wrote:
>> The VIP is added as a local address inside the pod's netns, and some
>> routing trickery is used to deliver it to that netns.
>
>
> IMHO, that looks like a very specific implementation to me with a lot of
> trickery which breaks some fundamental networking rules.
>
>
>>
>>
>>
>> > On 10 January 2017 at 15:22, 'Tim Hockin' via kubernetes-sig-network
>> >> email to kubernetes-sig-network+unsub...@googlegroups.com.
>> >> To post to this group, send email to
>>> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-network+unsub...@googlegroups.com.
>>> To post to this group, send email to kubernetes-sig-network@googlegroups.com.
Sharing with the group
---------- Forwarded message ----------
From: Tim Hockin <tho...@google.com>
Date: Wed, Jan 11, 2017 at 4:12 PM
Subject: Re: [k8s-sig-net] NetworkPolicy vs Services
To: Salvatore Orlando <salv.o...@gmail.com>
On Wed, Jan 11, 2017 at 2:08 PM, Salvatore Orlando
<salv.o...@gmail.com> wrote:
> Replies Inline.
>
> Cheers,
> Salvatore
>
> On 11 January 2017 at 19:06, 'Tim Hockin' via kubernetes-sig-network
>> >> >> >> email to kubernetes-sig-network+unsub...@googlegroups.com.
>> >> >> >> To post to this group, send email to
>> >> >> >> kubernetes-sig-network@googlegroups.com.
>> >> >> >> Visit this group at
>> >> >> >> https://groups.google.com/group/kubernetes-sig-network.
>> >> >> >> For more options, visit https://groups.google.com/d/optout.
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "kubernetes-sig-network" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to kubernetes-sig-network+unsub...@googlegroups.com.
>> To post to this group, send email to
>> Visit this group at
>> https://groups.google.com/group/kubernetes-sig-network.
>> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-network+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-network@googlegroups.com.
Sorry I did not realize I did reply to you alone ;)Salvatore
On 12 January 2017 at 23:29, 'Tim Hockin' via kubernetes-sig-network <kubernetes-...@googlegroups.com> wrote:
Sharing with the group
---------- Forwarded message ----------
From: Tim Hockin <tho...@google.com>
Date: Wed, Jan 11, 2017 at 4:12 PM
Subject: Re: [k8s-sig-net] NetworkPolicy vs Services
To: Salvatore Orlando <salv.o...@gmail.com>
On Wed, Jan 11, 2017 at 2:08 PM, Salvatore Orlando
<salv.o...@gmail.com> wrote:
> Replies Inline.
>
> Cheers,
> Salvatore
>
> On 11 January 2017 at 19:06, 'Tim Hockin' via kubernetes-sig-network
>> >> >> >> email to kubernetes-sig-ne...@googlegroups.com.
>> >> >> >> To post to this group, send email to
>> >> >> >> kubernetes-...@googlegroups.com.
>> >> >> >> Visit this group at
>> >> >> >> https://groups.google.com/group/kubernetes-sig-network.
>> >> >> >> For more options, visit https://groups.google.com/d/optout.
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "kubernetes-sig-network" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to kubernetes-sig-ne...@googlegroups.com.
>> To post to this group, send email to
>> Visit this group at
>> https://groups.google.com/group/kubernetes-sig-network.
>> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-ne...@googlegroups.com.
To post to this group, send email to kubernetes-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-sig-network.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-ne...@googlegroups.com.
To post to this group, send email to kubernetes-...@googlegroups.com.
I still need to give this important topic more thought, but here’s my thinking so far. I would appreciate if people could flag any points that I might have got wrong - because I’m sure I’ll have got some of them wrong!
Firstly, some observations about the context of the issue we are trying to solve:
We have a broad range of network and NP implementations for Kubernetes. Some network and NP implementations are tightly coupled. Some are less tightly coupled - for example, there are some implementations of NP that can be deployed on top of several different network implementations from different vendors. (I don’t believe anyone has implemented a NP implementation that is compatible with every network implementation though.)
Some network and NP implementations are compatible with kube-proxy’s implementation of services. Some aren’t and have implemented their own service implementations (kube-proxy equivalents).
A new implementation of services is being considered. (I’ll call it SX in the rest of this email for short.)
Some network and NP implementations are compatible with SX; some aren’t.
Even without NP, some network implementations will be compatible with SX and some won’t - because it fundamentally changes what the packet looks like both when traversing the network and when being delivered to the pod.
I’m not clear how SX gets packets to traverse the network given the above. My guess is it tunnels them in some way, which effectively means in one sense that it is a network implementation. Choosing to use SX changes how traffic gets from pod-to-pod when services are being used. If services are being used for the majority of pod-to-pod traffic then most traffic within the cluster will be via these tunnels rather than via the base network implementation that is configured via CNI.
Within the above context, we are considering whether we want to change NP definition to make it easier for (some) NP implementations to work with SX by replacing the podSelector field in NP objects with Services (LocalObjectReference).
Some thoughts on potential complications of this:
For an NP implementation to be compatible with both kube-proxy and SX, it would need to not care whether traffic arrives on a pod’s IP or on a service VIP that is mapped to that pod - because it could be either depending on whether kube-proxy or SX is being used. If the NP implementation uses dest IP to determine what traffic is allowed then it means a doubling of the number of match rules that need to be rendered by that implementation. Probably not a big deal in terms of implementation complexity, but a bit tedious and potentially confusing.
Services support port mapping (mapping from the service ports to target ports on the pods). Target ports can be named ports, which means a service may map to different target ports on different pods. This is problematic when using SX with an NP implementation that just uses dest IP alone to determine which ingress policy to apply since it cannot determine the correct port to allow because it just sees the VIP, not the pod IP. (This assumes that SX supports service port mapping, and makes some guesses on where that port mapping happens.)
Does the Service type imply anything different for the NP? Eg ClusterIP vs NodePort Services typically have different reachability from inside/outside the cluster. I think this is probably live with as “it will depend on your network, NP, and services implementations”, though might be a little confusing in some cases.
The cost across the networking community of this change could be some number of man years. I’m guessing some implementations may be very easy to adapt, others not so much. If we replace podSelector with Service then that work is effectively mandatory for everyone who wants to support any NP. We need to consider the user community too and how long we need to support the current beta object and how people migrate from that to Service based.
It might be significantly less impactful (on implementors and users) to introduce a new serviceSelector field alongside the existing podSelector field, with the constraint that you can only specify one of these for each NP object. “One of” field constraints are used elsewhere in k8s objects (e.g. Probe objects) so this wouldn’t be a first. We could decouple the introduction of this new feature from graduating the current beta object, give us more time to work through all the consequences, and decide whether this should be a mandatory or optional feature of NP implementations.
Looking ahead to the future and egress policy, should rules also use Services instead of label selectors? In an SX environment egress rules could well have the same issue as we are considering now for ingress rules where VIP hides the destination pod IP.
There was some discussion of “non-obviousness” around the interactions between NP implementations and SX. I’m not sure that changing NP definition significantly reduces “non-obviousness” given all these subtle interactions. And there’s probably a whole bunch of things we haven’t thought of yet.
I’m sure there will be a lot more discussion on this topic, but I’m leaning towards not trying to solve this all now, and instead leaving open the option of adding serviceSelector alongside podSelector (as a “one of” field) in the future if we determine that SX needs to work with more network and NP implementations than it does today and we think this will help.