I have a demo app for testing the local docker, Local Kubernetes and Istio setup. I expose the demo service as type=NodePort initially and it works fine on http://localhost:<NodePort#> without Istio. Then, I tried installing Istio and configured the service as ClusterIP, and exposed it via the Istio-IngressGateway and VirtualService, the basic configuration is inline :
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: demo-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: demoservice
spec:
hosts:
- "*"
gateways:
- demo-gateway
http:
- route:
- destination:
host: demo-service
port:
number: 80
Post deploying this, navigating to http://localhost/ gives an HTTP 404 error. The Service, VS, Gateway everything looks fine on the cluster. As I am new to this, I am not sure if I am missing something basic here with Istio or Kubernetes.
kubectl get svc istio-ingressgateway -n istio-system
. Could you try with that and let me know if that work if you use it instead of localhost? – Jakub