From: Phil Sutter <phil@nwl.cc>
To: Arturo Borrero Gonzalez <arturo@netfilter.org>
Cc: "Serguei Bezverkhi (sbezverk)" <sbezverk@cisco.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>,
"netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>,
Laura Garcia <nevola@gmail.com>
Subject: Re: Operation not supported when adding jump command
Date: Wed, 27 Nov 2019 12:57:18 +0100 [thread overview]
Message-ID: <20191127115718.GI8016@orbyte.nwl.cc> (raw)
In-Reply-To: <3a457e5b-be8f-e99d-fb0d-4826a15a4a55@netfilter.org>
Hi Arturo,
On Wed, Nov 27, 2019 at 11:11:32AM +0100, Arturo Borrero Gonzalez wrote:
> On 11/26/19 10:20 PM, Serguei Bezverkhi (sbezverk) wrote:
> > On Tue, Nov 26, 2019 at 06:47:09PM +0000, Serguei Bezverkhi (sbezverk) wrote:
> > > Ok, I guess I will work around by using input and output chain types, even though it will raise some brows in k8s networking community.
> > >
>
> @Sergei, thanks for reaching out about this topic.
>
> I'm using k8s a lot lately and would be interested in knowing more about what
> you are trying to do with kubernetes and nftables.
>
> In any case, if the somebody in kubernetes is planning to introduce nft for
> kube-proxy or other component, I would suggest the generated ruleset is
> validated here to really benefit from nftables. Is this what you are doing, right?
>
> Recently I had the chance to attend a talk by @Laura (in CC) about the iptables
> ruleset generated by docker and kube-proxy. Such rulesets are the opposite of
> something meant to scale and perform well. Then people compare such rulesets
> with other networking setups... and unfair compare.
>
> Worth mentioning at this point this PoC too:
>
> https://github.com/zevenet/kube-nftlb
>
> Trying to mimic 1:1 what iptables was doing is a mistake from my point of view.
> I believe you are aware of this already :-)
>
> >
> > Keeping both target address and port in a single map for *NAT statements
> > is not possible AFAIK.
>
> @Phil, I think it is possible! examples in the wiki:
>
> https://wiki.nftables.org/wiki-nftables/index.php/Multiple_NATs_using_nftables_maps
>
> It would be something like:
>
> % nft add rule nat prerouting dnat \
> tcp dport map { 1000 : 1.1.1.1, 2000 : 2.2.2.2, 3000 : 3.3.3.3} \
> : tcp dport map { 1000 : 1234, 2000 : 2345, 3000 : 3456 }
Ah, thanks! Using two maps didn't come to mind.
> > If I'm not mistaken, you might be able to hook up a vmap together with
> > the numgen expression above like so:
> >
> > | numgen random mod 0x2 vmap { \
> > | 0x0: jump KUBE-SEP-FS3FUULGZPVD4VYB, \
> > | 0x1: jump KUBE-SEP-MMFZROQSLQ3DKOQA }
> >
> > Pure speculation, though. :)
> >
>
> This works indeed. Just added the example to the wiki:
>
> https://wiki.nftables.org/wiki-nftables/index.php/Load_balancing#Round_Robin
Thanks, Phil
next prev parent reply other threads:[~2019-11-27 11:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-25 18:55 Operation not supported when adding jump command Serguei Bezverkhi (sbezverk)
2019-11-26 12:21 ` Florian Westphal
2019-11-26 14:30 ` Serguei Bezverkhi (sbezverk)
2019-11-26 14:52 ` Florian Westphal
2019-11-26 15:38 ` Pablo Neira Ayuso
2019-11-26 15:47 ` Serguei Bezverkhi (sbezverk)
2019-11-26 15:51 ` Phil Sutter
2019-11-26 18:47 ` Serguei Bezverkhi (sbezverk)
2019-11-26 19:27 ` Phil Sutter
2019-11-26 21:20 ` Serguei Bezverkhi (sbezverk)
2019-11-26 22:15 ` Phil Sutter
2019-11-27 10:11 ` Arturo Borrero Gonzalez
2019-11-27 11:57 ` Phil Sutter [this message]
2019-11-27 14:36 ` Serguei Bezverkhi (sbezverk)
2019-11-27 15:08 ` Phil Sutter
2019-11-27 15:35 ` Serguei Bezverkhi (sbezverk)
2019-11-27 16:06 ` Phil Sutter
2019-11-27 16:50 ` Serguei Bezverkhi (sbezverk)
2019-11-27 17:22 ` Phil Sutter
2019-11-28 1:22 ` Serguei Bezverkhi (sbezverk)
2019-11-28 9:10 ` Laura Garcia
2019-11-28 11:58 ` Serguei Bezverkhi (sbezverk)
2019-11-28 13:08 ` Phil Sutter
2019-11-28 13:34 ` Serguei Bezverkhi (sbezverk)
2019-11-28 14:51 ` Serguei Bezverkhi (sbezverk)
2019-11-28 15:15 ` Phil Sutter
2019-11-29 20:13 ` Serguei Bezverkhi (sbezverk)
2019-11-30 0:04 ` Phil Sutter
2019-12-03 18:43 ` Serguei Bezverkhi (sbezverk)
2019-12-04 10:36 ` Phil Sutter
2019-12-03 23:50 ` Duncan Roe
2019-12-04 1:13 ` [PATCH nft] doc: Clarify conditions under which a reject verdict is permissible Duncan Roe
2019-12-06 2:37 ` [PATCH nft v2] " Duncan Roe
2019-12-06 6:55 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191127115718.GI8016@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=arturo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=nevola@gmail.com \
--cc=pablo@netfilter.org \
--cc=sbezverk@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox