I am trying to create a service on kubernetes on openstack cluster with type = LoadBalancer but it fails to create Loadbalancer saying neutron error (below exact error snippet) .
Below is the web.yaml file :
[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."}
you are getting this error because k8s might be working in private subnet in your openstack, try to do it with LbaaS (equivalent of ELB in AWS) and attach instances to it.