apisix-helm-chart
apisix-helm-chart copied to clipboard
`apisix.podAntiAffinity` have no effect
Hi there, I tried to use apisix.podAntiAffinity to let apisix pods to spread on different nodes.
But this option had no effect in the latest version of helm chart.
Then I found this commit 31b915a0ffdf4987694c3e669e11afd728452e09 removed podAntiAffinity, and did not have a documentation removal of this change.
Should there be a change of documentation and values.yaml of this removal? And is there any information about kube-scheduler will take care of this?
Thanks.
@fengxsong Could you take a look when you have time?
@Lyt99 At first, I defined template function apisix.podAntiAffinity only for situation that apisix instance use hostnetwork and the kind of apisix is Deployment. and then I discovered that the kube-scheduler will pre-filter nodes that do not use host ports when scheduling a unbound Pod, which ensures that each instance will be scheduled to a different node.
@Lyt99 If you are using deployment that do not use hostnetwork option, and wanna place each apisix instances on different nodes, then you should configure the apisix.affinity options.
@Lyt99 If you are using deployment that do not use hostnetwork option, and wanna place each apisix instances on different nodes, then you should configure the
apisix.affinityoptions.
In my situation, I want pods to spread on different nodes to achieve high availability, which prevents from one node down, causes all APISIX pods unavailable.
But it's okay for me to have the reason you've explained above, but maybe need some changes to the documentation. And i'm also considering switch my pods to hostnetwork later.
@Lyt99 If you are using deployment that do not use hostnetwork option, and wanna place each apisix instances on different nodes, then you should configure the
apisix.affinityoptions.
Yes, I'll try it. Thanks for your explanation!
@Lyt99 If you are using deployment that do not use hostnetwork option, and wanna place each apisix instances on different nodes, then you should configure the
apisix.affinityoptions.In my situation, I want pods to spread on different nodes to achieve high availability, which prevents from one node down, causes all APISIX pods unavailable.
But it's okay for me to have the reason you've explained above, but maybe need some changes to the documentation. And i'm also considering switch my pods to hostnetwork later.
@Lyt99 Would you like to submit a PR to optimize the docs?
@Lyt99 If you are using deployment that do not use hostnetwork option, and wanna place each apisix instances on different nodes, then you should configure the
apisix.affinityoptions.In my situation, I want pods to spread on different nodes to achieve high availability, which prevents from one node down, causes all APISIX pods unavailable. But it's okay for me to have the reason you've explained above, but maybe need some changes to the documentation. And i'm also considering switch my pods to hostnetwork later.
@Lyt99 Would you like to submit a PR to optimize the docs?
@tokers Sure, let me submit a PR later.