我正在尝试在openstack集群上使用type = LoadBalancer在kubernetes上创建服务,但它无法创建Loadbalancer说中子错误(低于确切的错误代码段) .
以下是 web.yaml 文件:
[root]#kubectl create -f web.yaml
apiVersion: v1
kind: Service
metadata:
name: web
labels:
name: web
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 3000
protocol: TCP
selector:
name: web
[root]#kubectl describe svc web
Name: web
Namespace: default
Labels: name=web
Selector: name=web
Type: LoadBalancer
IP: 10.101.101.255
Port: <unset> 80/TCP
NodePort: <unset> 31561/TCP
Endpoints: 10.32.0.2:3000,10.44.0.2:3000
Session Affinity: None
Events:
Warning CreatingLoadBalancerFailed
Error creating load balancer (will retry): Failed to create load balancer for service default/web: Expected HTTP response code [201 202] when accessing [POST https://us-tx4.cloud.com:9696/v2.0/lb/pools], but got 400 instead {"NeutronError": "Invalid input for subnet_id. Reason: '' is not a valid UUID."}
1 回答
您收到此错误是因为k8s可能在您的openstack中的私有子网中工作,尝试使用LbaaS(相当于AWS中的ELB)并将实例附加到它 .