百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lvscare

> 编程语言
开源

轻量级LVS婴儿护理,支持ipvs健康检查

193 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

轻量级LVS婴儿护理,支持ipvs健康检查

LVScare

A lightweight LVS baby care, support health check, currently only HTTP prober supported, sealos using lvscare for kubernetes masters HA.

Feature

If real server is unavailable, lvscare firstly set weight of rs to 0(for TCP graceful termination), and remove it from backends during the next check, if real server return to available, add it back. This is useful for kubernetes master HA.

Attention

  1. running lvscare static pod in kubernetes with cilium CNI, cilium MUST configured with prepend-iptables-chains: false

Quick Start

bash
lvscare care --run-once --vs 10.103.97.12:6443 --rs 192.168.0.2:6443 --rs 192.168.0.3:6443 --rs 192.168.0.4:6443

run once mode just simply setup rules and exit. and it WON'T perform health checks.

Then kubeadm join can use 10.103.97.12:6443 instead of real masters.

Run lvscare as a static pod on every kubernetes workers. now control planes are also supported with link mode.

bash
lvscare care --vs 10.103.97.12:6443 --rs 192.168.0.2:6443 --rs 192.168.0.3:6443 --rs 192.168.0.4:6443 --interval 5 --mode link
  • --mode defaults to route, from my test case seems route mode doesn't make sense..
  • --interval every 5s check the real server port
  • --health-path "/healthz" if returned status code is smaller than 400, then real server will be removed. this default behavior can be override by --health-status flag.

Check with lvscare care --help command for more options.

Test

If the real server is listening on the same host, you MUST run with link mode.

start some echoserver as real servers

bash
docker run -p 8081:80 --name echoserver1 -d cilium/echoserver
docker run -p 8082:80 --name echoserver2 -d cilium/echoserver
docker run -p 8083:80 --name echoserver3 -d cilium/echoserver

and run lvscare foreground

bash
lvscare care --vs 169.254.0.1:80 --rs 127.0.0.1:8081 --rs 1.0.0.1:8082 --rs 127.0.0.1:8083 --logger DEBG --health-schem http --health-path / --mode link

link mode actually automatically setup rules below.

…

create another terminal, check ipvs rules:

bash
[root@VM-16-107-centos ~]# sudo ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  169.254.0.1:80 rr
  -> 127.0.0.1:8080               Masq    1      0          2
  -> 127.0.0.1:8081               Masq    1      0          2
  -> 127.0.0.1:8082               Masq    1      0          2

As you can see, all the real server had been added. Now you can perform a HTTP request to http://$vip:$port with curl:

…

stop any of echoservers, and wait for 2 rounds(10s), then restart it

…

you can observe logs from lvscare

log
2022-07-30T18:55:34 debug probe: Get "http://127.0.0.1:8083/": dial tcp 127.0.0.1:8083: connect: connection refused
2022-07-30T18:55:34 debug Trying to update wight to 0 for graceful termination
2022-07-30T18:55:39 debug probe: Get "http://127.0.0.1:8083/": dial tcp 127.0.0.1:8083: connect: connection refused
2022-07-30T18:55:39 debug Trying to delete real server
2022-07-30T18:55:44 debug probe: Get "http://127.0.0.1:8083/": dial tcp 127.0.0.1:8083: connect: connection refused
2022-07-30T18:55:49 debug Trying to add real server back

But the address is still accessible!

You can remove one or more, even destroy all of them and then check out IPVS rules.

Cleanup

Append -C or --clean option with lvscare command ran before.

bash
lvscare care --vs 169.254.0.1:80 --logger DEBG --mode link -C

Welcome to give it a shot, have fun with it.

Contribution Policy

This repository does NOT accept any form of contributions.
This includes:

  • ❌ Pull requests
  • ❌ Direct code submissions
  • ❌ Bug reports
  • ❌ Feature requests
  • ❌ Documentation changes

All contributions must be submitted exclusively to the central repository:
https://github.com/labring/sealos


Contribution Guidelines

  1. For bugs
    → Report in the Issues section of the main repository
    → Include reproduction steps and environment details

  2. For code contributions
    → Submit changes via main repository only
    → Follow contribution guidelines at sealos/CONTRIBUTING.md

  3. For feature requests
    → Create an Issue in the main repository with [Feature] prefix


Important Notes

⚠️ This repository is read-only

  • Serves as reference implementation only
  • Active development occurs exclusively at labring/sealos
  • PRs/issues submitted here will be closed immediately without review

Any contributions made to this repository will be invalid
For your submissions to be considered, please use the central repository.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言