Thank you Brandon and Rob. Yes, After trying with 172.17.4.x address, it all worked fine.
We are planning to use Kubernetes on Local Vagrant&CoreOS environment. Do you have any recommendation/best practices for how to expose our APIs to users on our intranet? Thank you again, Turgos. On Fri, Jun 24, 2016 at 8:30 PM, Brandon Philips <[email protected] > wrote: > Right, the IP listed is the IP of the pod. Not the IP of the virtual > machine. You need to hit the 172.17.4.x address as rob mentions. > > On Fri, Jun 24, 2016 at 12:04 PM Rob Szumski <[email protected]> > wrote: > >> Are you using the coreos-kubernetes Vagrant boxes >> <https://coreos.com/kubernetes/docs/latest/kubernetes-on-vagrant.html>? Those >> should be set up with 172.17.4.x IP addresses, which is the node’s IP >> address. That box should have the networking set up such that you can >> access it from your laptop/host machine. >> >> On Jun 24, 2016, at 2:24 PM, Gokhan Sevik <[email protected]> wrote: >> >> I still cannot access after setting the type NodePort. >> >> *$ kubectl expose deployment api4docker --type=NodePort* >> >> *$ kubectl describe services api4docker* >> >> Name: api4docker >> >> Namespace: default >> >> Labels: run=api4docker >> >> Selector: run=api4docker >> >> Type: NodePort >> >> IP: 10.3.0.88 >> >> Port: <unset> 8080/TCP >> >> NodePort: <unset> 31713/TCP >> >> Endpoints: 10.2.46.2:8080,10.2.97.3:8080 >> >> Session Affinity: None >> >> No events. >> >> *$ curl http://10.3.0.88:31713 <http://10.3.0.88:31713/>* >> >> curl: (7) Failed to connect to 10.3.0.88 port 31713: Operation timed out >> >> >> >> By the way, I can ping the 10.3.0.88 and get reply >> >> >> >> On Fri, Jun 24, 2016 at 1:56 PM, Rob Szumski <[email protected]> >> wrote: >> >>> Nope, it only works for VMs set up on the cloud. The NodePort should >>> work for you though. >>> >>> On Jun 24, 2016, at 1:53 PM, Gokhan Sevik <[email protected]> >>> wrote: >>> >>> Hi Rob, >>> Does cloud credentials set up required/works for local set up? Is there >>> any link how to set it for my Kubernetes with local Vagrant&CoreOS. >>> >>> Thank you, Turgos, >>> >>> On Fri, Jun 24, 2016 at 12:59 PM, Rob Szumski <[email protected]> >>> wrote: >>> >>>> It doesn’t look like you have cloud credentials set up to use >>>> Type=LoadBalancer. If it had worked, you’d see a “loadBalancerIP” field. >>>> >>>> You could also expose this service as a NodePort, which is just a port >>>> in the 32xxx range that works on every machine in the cluster. You can then >>>> hook this up to a load balancer yourself, or just use the port directly. I >>>> find that NodePorts are great for testing since they work in all >>>> environment pretty easily. >>>> >>>> - Rob >>>> >>>> On Jun 24, 2016, at 11:24 AM, Turgos <[email protected]> wrote: >>>> >>>> *$ kubectl get svc api4docker* >>>> NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE >>>> api4docker 10.3.0.95 8090/TCP 20m >>>> >>>> >>>> >>> >>> >> >>
