kubernetes - metallb提供的IP不可访问
问题描述
我有一个带有金属 LB 的裸机 Kubernetes 集群。我已将 GCP 外部负载均衡器用于分配给 Metallb 的 IP。Metallb 已将该 IP 分配给服务,但我仍然无法从集群外部访问该 IP 上的服务。
apiVersion: v1
kind: Service
metadata:
name: nginxlb
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 34.149.177.23-34.149.177.23
解决方案
推荐阅读
- drop-down-menu - Flutter - 如何从 DropdownButton 对齐所选项目?
- java - 如何使用 apigateway 保护基于 Java 的 REST API
- google-cloud-platform - 匿名调用者没有 storage.objects.create 访问权限,但我的 JWT 有范围 https://www.googleapis.com/auth/devstorage.full_control
- mysql - 为房地产连接 4 个 MySql 表
- mysql - Hibernate Criteria Query 使用 MySQL REPLACE 和 CONCAT 函数
- python - 无法将字符串转换为浮点数
- styles - 在选择时将 wfs 属性显示为标签
- mongodb - 当我在应用程序中有计时器时,使用passenger_min_instances 重复数据库条目
- javascript - 使用默认属性破坏作为函数参数的对象
- linux - 第 1 列中相同值的第 2 列和第 3 列之和