adding node port to an exciting istio service

I created a local kubernetes cluster with a master and 2 workers using VM(ubuntu 16.04) I am also using calico for networking and I am exploring istio for the moment. my problem is the ingress load balancer doesn't get an external IP. to my understanding I should use a node port to access the ingress load balancer but I can find how to do so. should I have done it when installing, can I add it now and how?

kubernetes version : v1.11.1 calico version : v3.1 istio version : 0.8.0

1 answer

  • answered 2018-07-19 15:49 jaxxstorm

    If don't have a service attached to your deployment, you can use kubectl expose:

    kubectl expose deployment istio --type=NodePort --name=istio-service

    If you already deployed a service, you can edit the service spec and add type: "NodePort" the quickest way to do this is using kubectl patch:

    kubectl patch svc istio-service -p '{"spec":{"type":"NodePort"}}'

    More info about NodePort services can be found here