Good day to all! The test cluster Kubernetes (RKE - Rancher Kubernetes) in the local network is launched.

Application is running and running

# cat ibank-deployment.yml apiVersion: apps/v1beta2 kind: Deployment metadata: name: ibank-api-deployment namespace: ibank-at labels: app: ibank-api spec: replicas: 1 selector: matchLabels: name: ibank-api template: metadata: labels: name: ibank-api spec: containers: - name: ibank-api image: myimage:latest env: - name: JAVA_OPTS value: '-XX:MaxPermSize=512m -Xms512m -Xmx1024m -Djava.net.preferIPv4Stack=true ...' resources: requests: cpu: '1300m' limits: cpu: '2000m' readinessProbe: httpGet: path: /public/json?service=info port: 8080 initialDelaySeconds: 300 periodSeconds: 10 livenessProbe: httpGet: path: /public/json?service=info port: 8080 initialDelaySeconds: 300 periodSeconds: 10 

Next, I need to bring this application out. With NodePort, everything works fine. But this is not what I need. I need a static port. I'm setting up for LoadBalancer

 # cat ibank-loadbalancer.yml apiVersion: v1 kind: Service metadata: name: ibank-api namespace: ibank-at spec: selector: name: ibank-api ports: - protocol: TCP port: 8083 targetPort: 8080 loadBalancerIP: 10.10.169.24 type: LoadBalancer 

And I see the following

 # rancher kubectl get service -n ibank-at NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ibank-api LoadBalancer 10.43.21.56 <pending> 8083:32352/TCP 20m 

I see the similar status "Pending" in the webmord of the rancher for the service and for the balancer. If I correctly understood the documentation I’ve dug, then the question is that the cuber is waiting for a "white" address. But I have a test cluster and it is running on the local network. I can not give him a white address. Tell me how to get around the problem or give a magic pendal what and where to look for to get the balancer to work.

    1 answer 1

    Try this:

    Replace

     loadBalancerIP: 10.10.169.24 

    on

     externalIPs: - 10.10.169.24