How to create an external IP with these values?

7/11/2018

I got to create an external IP for accessing this dash from outside. When I try kubectl expose... it still stay like this

root@mar:~# kubectl get svc

NAME           TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE       SELECTOR
alertmanager   ClusterIP   10.6.43.10    <none>        9093/TCP         36m       app=alertmanager
faas-netesd    ClusterIP   10.7.8.1      <none>        8081/TCP         36m       app=gateway
gateway        NodePort    10.7.2.10     <none>        8080:31112/TCP   31m       app=gateway
nats           ClusterIP   10.8.4.6      <none>        4222/TCP         36m       app=nats
prometheus     NodePort    10.102.4.2    <none>        9090:31119/TCP   36m       app=prometheus
-- jahn dew
kubectl
kubernetes

1 Answer

7/12/2018

You have not configured your FaaS-netesd service with "NodePort".If you want to access dash of FaaS-netesd service run this command "kubectl get svc -n ".It will list down all the services in that namespace.Now copy the service name and run "kubectl edit svc -n ".

Just edit value of "spec.type" to "NodePort".After this you can see a high port number on hitting command kubectl get svc -n {name of your namespace}.

Finally go to a browser and hit http://{node-IP-address}:{high-port-number} your dash should be visible.

-- Abhay Dwivedi
Source: StackOverflow