k8snetworkplumbingwg / whereabouts

A CNI IPAM plugin that assigns IP addresses cluster-wide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Query: Static ip allocation on multus interface for pods in a Statefulset

lchimbili opened this issue · comments

Hi All,

I'm looking for a solution to be able to statically allocate fixed IP addresses to multiple pod instances in a statefulset.

Static plugin allows IP allocation to a single pod instance in a Statefulset and does not support IP allocation for multiple pod instances.

Whereabouts allows dynamic allocation of IP addresses from a given IP range to multiple instances of a Statefulset.
However, it is not guaranteed to assign the same IP address to a pod instance during scaling in and out and during pod recreation.

This causes a problem to certain applications which are stateful and do not expect the ip address to change.
If i reserve an IP address range exclusively for the Statefulset, is it possible to achieve fixed IP address allocation to each pod instance of a statefulset from this IP range even on scaling in and out or pod recreation.

I'm also encounter the fixed IP allocation feature, if someone consider to implement it, please consider the following case too.

I'm thinking about two cases:

  1. KubeVirt machine also needs static IP for the pod, it has some clue, say a label: kubevirt.io/vm: vm-centos8.
  2. using fixed mac generated by kubemacpool as clue.