ClusterIP:无和失败的吊舱 [英] ClusterIP: None and failing pods

查看:424
本文介绍了ClusterIP:无和失败的吊舱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在几个POD前面有一个NGINX,通过ClusterIP公开:没有.

I have an NGINX in front of several PODs, exposed through ClusterIP: none.

NGINX会将流量转发到这些节点,如下所示:

NGINX is forwarding traffic to these nodes like that:

upstream api {
   server my-api:1066;
}

此配置是否会在my-api主机名后面的所有POD之间平均分配流量? 是否会从主机名解析中删除失败的POD?

Will this configuration distribute traffic evenly among all PODs behind the my-api hostname? Will failing PODs be removed from the hostname resolution?

推荐答案

Kubernetes服务的默认流量分配基于默认的

The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)

在非常旧的Kubernetes版本(< 1.1)中,默认

In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)

(可选)进行轮循的新方法(<1.8)是使用

The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.

您还可以查看其他提供负载平衡功能的解决方案,例如 Cillium .

You can also look at other solutions like Cillium that provide load balancing capabilities.

这篇关于ClusterIP:无和失败的吊舱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆