具有TTL的Kubernetes端点 [英] Kubernetes Endpoints with TTL

查看:94
本文介绍了具有TTL的Kubernetes端点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个没有选择器的Kubernetes服务,我想通过让端点服务器自行注册/心跳来手动管理端点.

I have a Kubernetes service without a selector for which I would like to manually manage the Endpoints by having the endpoint servers register/heartbeat themselves.

当我将端点发布到Kubernetes API服务器时,是否可以为端点指定TTL,以便在端点服务器终止并停止心跳时它们将超时并被自动删除?

Is there a way to specify a TTL for Endpoints when I POST them to the Kubernetes API server, so that they will timeout and be deleted automatically if my endpoint server terminates and stops heartbeating?

如果没有,那么我是否直接通过将POST直接发布到基础Etcd而不是通过Kubernetes API来将端点添加到注册表中,还是会导致其他问题?

If not, would it be reasonable if I add the Endpoints to the registry by POSTing directly to the underlying Etcd, instead of going through the Kubernetes API, or will that cause other problems?

推荐答案

端点API对象中没有内置TTL或心跳.您确实不想直接写到etcd…最终会咬住您

There is no TTL or heartbeat built into the endpoints API objects. You really don't want to write directly to etcd though… that will bite you eventually

这篇关于具有TTL的Kubernetes端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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