惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
SecWiki News
SecWiki News
Project Zero
Project Zero
C
Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
A
Arctic Wolf
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
The Hacker News
The Hacker News
T
Tenable Blog
雷峰网
雷峰网
有赞技术团队
有赞技术团队
V
V2EX
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threat Research - Cisco Blogs
T
Threatpost
AWS News Blog
AWS News Blog
L
LINUX DO - 热门话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
SegmentFault 最新的问题
月光博客
月光博客
Spread Privacy
Spread Privacy
S
Secure Thoughts
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
Forbes - Security
Forbes - Security
T
The Exploit Database - CXSecurity.com
G
GRAHAM CLULEY
The Last Watchdog
The Last Watchdog
Y
Y Combinator Blog
I
Intezer
博客园 - 【当耐特】
B
Blog RSS Feed
Attack and Defense Labs
Attack and Defense Labs
I
InfoQ
博客园 - 叶小钗
Cyberwarzone
Cyberwarzone
V2EX - 技术
V2EX - 技术
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
C
CERT Recently Published Vulnerability Notes

k8s on 打工人日志

k8s RKE2 cilium L2 + envoy gateway 安装配置 k8s RKE2 vSphere 存储配置 Kubernetes — skywalking + banyanDB APM监控部署 Kubernetes — promtail + loki + grafana 日志系统部署 Kubernetes — metalLB + Traefik 部署 Kubernetes — SSL 证书自动更新 Kubernetes — RKE2 + kube-vip + cilium 部署 metallb + ingress-nginx + argocd 本地部署 Kubernetes — k8s 手动安装 1.17.9 Kubernetes — containerd 安装和部署 Argo cd 安装和部署 Kubernetes — kubecost 分析 Kubernetes 成本 Ansible部署ceph集群 Kubernetes — 更新证书 Kubernetes — Rook云存储介绍和部署 Kubernetes — 基于K8S搭建Ceph分布式存储 Kubernetes — 探针和生命周期 Kubernetes — 开放标准(OCI、CRI、CNI、CSI、SMI、CPI)概述 kubernetes 部署插件 (Flannel、Web UI、CoreDNS、Ingress Controller) kubernetes 存储 kubernetes 从1.23.x 升级到 1.24.x 编写 kubernetes 资源描述文件 kubernetes manual expansion kubernetes 调度过程 k8s本地联调神器kt-connect kubernetes ansible自动化部署 kubernetes 脚本快速安装 kubernetes面试题汇总 Kubernetes 安装 Harbor 搭建 Kubernetes 实验手册(1) Keepalived高可用 helm 安装 k8s 部署loki日志 Kubernetes 创建nfs存储类 Kubernetes k8s 组件
OpenELB:让k8s私有环境对外暴露端口
2022-04-13 · via k8s on 打工人日志

OpenELB:云原生负载均衡器插件

OpenELB 是一个开源的云原生负载均衡器实现,可以在基于裸金属服务器、边缘以及虚拟化的 Kubernetes 环境中使用 LoadBalancer 类型的 Service 对外暴露服务。

在 Kubernetes 中安装 OpenELB

1kubectl apply -f https://raw.githubusercontent.com/openelb/openelb/master/deploy/openelb.yaml
  • 查看状态
1kubectl get po -n openelb-system

使用 kubectl 删除 OpenELB

1kubectl delete -f https://raw.githubusercontent.com/openelb/openelb/master/deploy/openelb.yaml

配置 OpenELB

1kubectl edit configmap kube-proxy -n kube-system
2
3# 修改 网卡
4ipvs:
5  strictARP: true

重启组件

1kubectl rollout restart daemonset kube-proxy -n kube-system

为 master1 节点添加一个 annotation 来指定网卡:

1kubectl annotate nodes master1 layer2.openelb.kubesphere.io/v1alpha1="192.168.0.2"

创建地址池 layer2-eip.yaml

1apiVersion: network.kubesphere.io/v1alpha2
2kind: Eip
3metadata:
4  name: layer2-eip
5spec:
6  address: 192.168.0.91-192.168.0.100
7  interface: eth0
8  protocol: layer2

创建部署 jobcher-service.yaml

 1#暴露端口
 2apiVersion: v1
 3kind: Service
 4metadata:
 5  name: jobcher-service
 6  annotations:
 7    lb.kubesphere.io/v1alpha1: openelb
 8    protocol.openelb.kubesphere.io/v1alpha1: layer2
 9    eip.openelb.kubesphere.io/v1alpha2: layer2-eip
10  labels:
11    app: jobcher-blog
12spec:
13  selector:
14    app: jobcher-blog
15  ports:
16    - name: jobcher-port
17      protocol: TCP
18      port: 80
19      targetPort: 80
20  type: LoadBalancer