简体   繁体   中英

kubernetes loadbalancer service - unable to set ingress ip

I updated my k8 cluster to 1.18 recently. Afterwards I had to recreate a (previously functional) loadBalancer service. It seemed to come up properly but I was unable to access the external ip afterwards. Looking at the dump from kubectl describe service I don't see a field for "loadbalancer ingress" that I see on other services that didn't get restarted.

apiVersion: v1
kind: Service
metadata:
  name: search-master
  labels:
    app: search
    role: master
spec:
  selector:
    app: search
    role: master
  ports:
    - protocol: TCP
      port: 9200
      targetPort: 9200
      name: serviceport
    - port: 9300
      targetPort: 9300
      name: dataport
  type: LoadBalancer
  loadBalancerIP: 10.95.96.43

I tried adding this (to no avail):

status:
  loadBalancer:
    ingress:
    - ip: 10.95.96.43

What have I missed here?


Updates:

  • Cluster is running in a datacenter. 10 machines + 1 master (vm)
  • "No resources found"

Another odd thing: when I dump the service as yaml I get this entry at the top:

apiVersion: v1
items:
- apiVersion: v1
  kind: Service
...
  spec: 
    clusterIP: <internal address>
    ...
  
    type: LoadBalancer
  status:
    loadBalancer: {}
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Something wrong with my yml?

For a distant observer - this is likely due to metallb version conflict. Note that 1.17-> 1.18 introduces some breaking changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM