1

In my data center, I implemented a Kubernetes infrastructure with 3 workers and one master node.

I'm looking to build 5 pods running postfix mail server, but because of risking to be blacklisted, I'm looking to assign a specific public IP to each pod for the outbound traffic.

I don't know if it's possible to do that and is there any solution to NAT the pod addresses?

Dave M
  • 4,494
  • 21
  • 30
  • 30
Demba
  • 11
  • 2
  • Hello. Could you tell more about your setup? Which `CNI` are you using? Have you seen [Multus](https://github.com/intel/multus-cni) by any chance? – Dawid Kruk Nov 27 '20 at 14:36
  • Thanks , i'm using weaves for networking .. and the cluster is running on my own datacenter not with cloud provider .. for that reason i jave more work to do – Demba Nov 27 '20 at 15:10

1 Answers1

0

Posting this answer as more of a potential pointers to check as there could be specific requirements and limitations of each solution and each infrastructure.

Feel free to expand it.

Possible solutions:

  • Multus CNI
  • OVS CNI

Multus CNI

As I said in the comment, one of the possible solutions is Multus:

Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods. Typically, in Kubernetes each pod only has one network interface (apart from a loopback) -- with Multus you can create a multi-homed pod that has multiple interfaces. This is accomplished by Multus acting as a "meta-plugin", a CNI plugin that can call multiple other CNI plugins.

-- Github.com: Intel: Multus CNI

Please refer to it's documentation about the configuration and usage:

A side note!

Installation of Multus could be also specified in Kubernetes provisioning tools like Kubespray.


OVS CNI

You can read on official Open vSwitch Github page:

This plugin allows user to define Kubernetes networks on top of Open vSwitch bridges available on nodes. Note that ovs-cni does not configure bridges, it's up to a user to create them and connect them to L2, L3 or an overlay network.

Github.com: Kubevirt: OVS CNI

In the link above there are requirements that need to be met as well some examples.


I encourage you to check the additional resources like:

A second side note!

You can also check if the Istio Egress gateway would suit your needs.

Dawid Kruk
  • 588
  • 2
  • 8