k8s部署OpenELB

k8s部署OpenELB

部署OpenELB至K8s集群

# k8s部署OpenELB
kubectl apply -f https://raw.githubusercontent.com/openelb/openelb/refs/heads/master/deploy/openelb.yaml

# 查看openelb的pod状态
kubectl get pods -n openelb-system

配置示例: layer2模式

下面的示例创建了一个EIP资源对象, 它提供了一个IP地址池LoadBlancer Service使用.

apiVersion: network.kubesphere.io/v1alpha2 # 定义资源的 API 版本
kind: Eip # 定义资源的类型为 Eip
metadata: # 元数据部分
  name: eip-pool # 资源的名称为 eip-pool
  annotations: # 注解部分
    eip.openelb.kubesphere.io/is-default-eip: "true" # 标记该 EIP 为默认的 EIP
spec: # 资源的具体配置
  address: 172.29.7.51-172.29.7.80 # 可用的 EIP 地址范围
  # 使用的二层网络协议
  protocol: layer2 # OpenELB 模式,支持 BGP、layer2、VIP 三种模式,此处为 layer2
  interface: enp1s0 # 监听 ARP 或 NDP 请求时使用的网卡名称,仅在 layer2 模式下有效
  disable: false # 是否禁用该 EIP,false 表示未禁用

查看

# 查看名为 eip-tool 的 Eip 资源对象的详细信息
kubectl get eip eip-tool
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

教Linux的李老师

赞赏是第一生产力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值