Use "loadBalancerIP" in kubernetes service

Hello!

I’m trying to create a kubernetes service using the following yaml file.

apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
type: LoadBalancer
loadBalancerIP: 104.154.109.191
externalTrafficPolicy: Local
selector:
app: nginx
ports:

  • name: http
    port: 80
  • name: https
    port: 443

It failed with the following message:

loadBalancerIP cannot be specified for Rancher LoadBalancer

We are using rancher v1.6.12.

Is there a workaround for it?

Thanks in advance!