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 >> >> >> > >
