Is it possible to assign a LoadbalancerIP to the ingressgateway using metalLB? Given this yaml it throws an error about loadBalancerIP ("unknown field "loadBalancerIP" in io.istio.networking.v1alpha3.Gateway.spec"), I can get around it by using the '--validate=false' flag but metalLB is not assigning the right IP address?
test.yaml:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: httpbin-gateway
spec:
loadBalancerIP: 10.0.0.242
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: httpbin
spec:
hosts:
- "*"
gateways:
- httpbin-gateway
http:
- match:
- uri:
prefix: /headers
route:
- destination:
port:
number: 8000
host: httpbin
layer2.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: nips
protocol: layer2
addresses:
- 10.0.0.206-10.0.0.225
auto-assign: true
- name: mainips
protocol: layer2
addresses:
- 10.0.0.230-10.0.0.239
auto-assign: false
- name: cheapips
protocol: layer2
addresses:
- 10.0.0.240-10.0.0.249
auto-assign: false
- name: web
protocol: layer2
addresses:
- 10.0.0.203-10.0.0.205
auto-assign: false
running the kubectl commands:
$ kubectl apply -f /tmp/test.yaml
error: error validating "/tmp/test.yaml": error validating data: ValidationError(Gateway.spec): unknown field "loadBalancerIP" in io.istio.networking.v1alpha3.Gateway.spec; if you choose to ignore these errors, turn validation off with --validate=false
$ kubectl apply --validate=false -f /tmp/test.yaml
gateway.networking.istio.io/httpbin-gateway created
virtualservice.networking.istio.io/httpbin created
$ kubectl get svc -n istio-system -o wide istio-ingressgateway
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
istio-ingressgateway LoadBalancer 10.108.199.32 10.0.0.206 15021:31659/TCP,80:30780/TCP,443:30769/TCP 17h app=istio-ingressgateway,istio=ingressgateway
Notice it got the wrong EXTERNAL-IP address from MetalLB.