Live data from Hacker News

Kubernetes Networking: Behind the Scenes

itnext.io

11–20 of 34 posts

Re: Kubernetes Networking: Behind the Scenes

#11
post #5

Did anyone do some measurements on k8s/container latency overhead in networks?

Yes. And they are _really_ easy to find. https://machinezone.github.io/research/networking-solutions-... https://itnext.io/benchmark-results-of-kubernetes-network-pl... Edit: added one more link

I love the idea of Cilium using BPF and XDP. They are the right tool for this type of software. And they extend it to do really cool things with it.

Re: Kubernetes Networking: Behind the Scenes

#12
post #5

Did anyone do some measurements on k8s/container latency overhead in networks?

Yes. And they are _really_ easy to find. https://machinezone.github.io/research/networking-solutions-... https://itnext.io/benchmark-results-of-kubernetes-network-pl... Edit: added one more link

I'm sorry that I'm an _idiot_.

Thanks for the links.

Re: Kubernetes Networking: Behind the Scenes

#13
I feel like k8s networking is 10x more complex than it needs to be...

I think it's because they still want to use the socket API, but to "pretend" you can open a socket to a pod, or to a service, etc.

Instead, they should have defined a new API, like "connect('k8s:service:foobar?selectionstrategy=leastloaded')"

Then they could have made simple LD_PRELOAD shims to get their magic API to work with existing software without modification.

There would be no need for millions of IPtables rules, virtual IP addresses, port remapping, proxy processes, etc.

Re: Kubernetes Networking: Behind the Scenes

#14

It's surprising k8s being so new seems to have no concept of ipv6

Because ipv6 is not a simple addition, but a complex suite of new protocols meant to replace v4, except that is never going to happen in our lifetimes. v6 should've simply been v4 with more bits

No backwards compatibility could be IPv6's biggest mistake. Now everyone is forced to maintain 2 IP addresses.

Re: Kubernetes Networking: Behind the Scenes

#16

I feel like k8s networking is 10x more complex than it needs to be... I think it's because they still want to use the socket API, but to "pretend" you can open a socket to a pod, or to a service, etc. Instead, they should have defined a new API, like "connect('k8s:service:foobar?selectionstrategy=leastloaded')" Then they could have made simple LD_PRELOAD shims to get their magic API to work with existing software wit…

That is basically how consul connect works: https://www.consul.io/docs/connect/native/go.html

Re: Kubernetes Networking: Behind the Scenes

#17

I feel like k8s networking is 10x more complex than it needs to be... I think it's because they still want to use the socket API, but to "pretend" you can open a socket to a pod, or to a service, etc. Instead, they should have defined a new API, like "connect('k8s:service:foobar?selectionstrategy=leastloaded')" Then they could have made simple LD_PRELOAD shims to get their magic API to work with existing software wit…

That is basically how consul connect works: https://www.consul.io/docs/connect/native/go.html

Not as I understand it. It uses DNS resolution, so you connect to something like foo.web.service.consul. Kubernetes's KubeDNS works exactly the same way with Kubernetes service objects.

Re: Kubernetes Networking: Behind the Scenes

#18

I feel like k8s networking is 10x more complex than it needs to be... I think it's because they still want to use the socket API, but to "pretend" you can open a socket to a pod, or to a service, etc. Instead, they should have defined a new API, like "connect('k8s:service:foobar?selectionstrategy=leastloaded')" Then they could have made simple LD_PRELOAD shims to get their magic API to work with existing software wit…

How is that different from today's use of KubeDNS?

Kubernetes' networking would arguably have been less complex (multiple CIDR subnets, proxying, etc.) if they'd embraced IPv6. But Google doesn't seem big on IPv6.

Re: Kubernetes Networking: Behind the Scenes

#19

I feel like k8s networking is 10x more complex than it needs to be... I think it's because they still want to use the socket API, but to "pretend" you can open a socket to a pod, or to a service, etc. Instead, they should have defined a new API, like "connect('k8s:service:foobar?selectionstrategy=leastloaded')" Then they could have made simple LD_PRELOAD shims to get their magic API to work with existing software wit…

API incompatibility is largely why AppEngine failed. Cloud adoption suffers greatly when the platform is not compatible with the data center.

Re: Kubernetes Networking: Behind the Scenes

#20

Earlier quoted context omitted.

Because ipv6 is not a simple addition, but a complex suite of new protocols meant to replace v4, except that is never going to happen in our lifetimes. v6 should've simply been v4 with more bits

No backwards compatibility could be IPv6's biggest mistake. Now everyone is forced to maintain 2 IP addresses.

I think that’s intended as a feature. IPv4 is just not good enough, we will run out of addresses. I think they want to kill IPv4 and replace it rather than improving upon it. At some point programs will ignore IPv4 altogether and our IP addresses will not be fundamentally flawed anymore.
Post reply on HN