In a KVM Vagrant VM (Ubuntu 20.04), I have setup a Kubernetes Cluster with Knative and Istio. The intent is to deploy functions to the cluster inside the VM be able to call them from my host machine (PopOs 22.04). The loadbalancer has an external IP: 192.168.1.240
kubectl get all --namespace=istio-system
NAME READY STATUS RESTARTS AGE
pod/cluster-local-gateway-6f45b9848f-pplbm 1/1 Running 0 38m
pod/istio-ingressgateway-865c54f859-8rqht 1/1 Running 0 38m
pod/istiod-597bf9bb5d-7wdxp 1/1 Running 0 39m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/cluster-local-gateway ClusterIP 10.103.42.182 <none> 15020/TCP,80/TCP,443/TCP 38m
service/istio-ingressgateway LoadBalancer 10.107.66.244 192.168.1.240 15021:32621/TCP,80:31238/TCP,443:30360/TCP,15012:32532/TCP,15443:32017/TCP 38m
service/istiod ClusterIP 10.100.95.76 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 39m
service/knative-local-gateway ClusterIP 10.111.64.124 <none> 80/TCP 37m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/cluster-local-gateway 1/1 1 1 38m
deployment.apps/istio-ingressgateway 1/1 1 1 38m
deployment.apps/istiod 1/1 1 1 39m
NAME DESIRED CURRENT READY AGE
replicaset.apps/cluster-local-gateway-6f45b9848f 1 1 1 38m
replicaset.apps/istio-ingressgateway-865c54f859 1 1 1 38m
replicaset.apps/istiod-597bf9bb5d 1 1 1 39m
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/cluster-local-gateway Deployment/cluster-local-gateway <unknown>/80% 1 5 1 38m
horizontalpodautoscaler.autoscaling/istio-ingressgateway Deployment/istio-ingressgateway <unknown>/80% 1 5 1 38m
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod <unknown>/80% 1 5 1 39m
When I perform a function call to a deployed function from inside the VM the call executes successfully, but when I try to perform the call from my host machine the call does not execute.
Is there a way to make the Istio Loadbalancer visible/accessible to my host machine?
CodePudding user response:
If you're running Kubernetes inside a Vagrant VM, you need to think a bit about what the network routing on your host machine (Linux) looks like. You'll probably want to route some set of IPs from your Linux machine to the Vagrant VM, and then install or use something like MetalLB within the VM to allow the VM ("guest") to route those additional IPs to your Kubernetes pods.