k8s部署OpenELB

k8s部署OpenELB

k8s部署OpenELB

部署OpenELB至K8s集群

yaml 复制代码
# 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使用.

yaml 复制代码
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 表示未禁用

查看

shell 复制代码
# 查看名为 eip-tool 的 Eip 资源对象的详细信息
kubectl get eip eip-tool
相关推荐
阿里云云原生3 小时前
记录一次排障范式的升级:当 AI 拥有“业务字典”,我们如何定义可信的数据查询?
云原生
正仪4 小时前
kubernetes中list-watch机制
云原生·容器·kubernetes
cui_hao_nan5 小时前
从零搭建 Kubernetes 集群:Ubuntu + kubeadm 完整实战
ubuntu·容器·kubernetes
fb_123456 小时前
Docker入门-第3章-容器镜像深度解析
运维·docker·容器
IT摆渡者7 小时前
基于 Docker 部署 Nextcloud 私有云盘(外挂 Windows 共享)项目实践
运维·docker·容器
Jeromefromhk7 小时前
我把所有服务搬上 Kubernetes,又全部搬了回来
kubernetes·devops
墨香幽梦客9 小时前
Kubernetes+Istio实现CRM系统弹性伸缩:服务网格下的流量治理与熔断策略
容器·kubernetes·istio
新时代牛马9 小时前
单机 docker run 管不住了?从编排需求、期望状态到调度/自愈闭环讲透
运维·docker·容器
binqian9 小时前
Docker Desktop(WSL2 后端)三层网络互通技术文档
网络·docker·容器
闲云野鹤在人间10 小时前
Docker入门|第1章 容器生态系统完整解析
运维·服务器·docker·容器·centos