kubectl expose - did I missed something?

Viewed 144

Hi I try to get access to th spring-boot tutorial app through fabric8

after:

C:\Users\gregor>kubectl expose deployment springboottut --type=LoadBalancer --name=my-service
service "my-service" exposed

C:\Users\gregor>kubectl get services my-service
NAME         CLUSTER-IP   EXTERNAL-IP   PORT(S)                                        AGE
my-service   10.0.0.200   <pending>     8080:30852/TCP,9779:32327/TCP,8778:31587/TCP   19s

C:\Users\gregor>kubectl describe services my-service
Name:                   my-service
Namespace:              default
Labels:                 group=net.sklorz
                        project=springboottut
                        provider=fabric8
                        version=0.0.1-SNAPSHOT
Annotations:            <none>
Selector:               group=net.sklorz,project=springboottut,provider=fabric8,version=0.0.1-SNAPSHOT
Type:                   LoadBalancer
IP:                     10.0.0.200
Port:                   port-1  8080/TCP
NodePort:               port-1  30852/TCP
Endpoints:              172.17.0.9:8080
Port:                   port-2  9779/TCP
NodePort:               port-2  32327/TCP
Endpoints:              172.17.0.9:9779
Port:                   port-3  8778/TCP
NodePort:               port-3  31587/TCP
Endpoints:              172.17.0.9:8778
Session Affinity:       None
Events:                 <none>

C:\Users\gregor> kubectl get pods --output=wide
NAME                                      READY     STATUS    RESTARTS   AGE       IP            NODE
configmapcontroller-4273343753-hfg5q      1/1       Running   17         6d        172.17.0.7    minikube
exposecontroller-1770961830-hbkgg         1/1       Running   17         6d        172.17.0.6    minikube
fabric8-3873669821-rhvw5                  2/2       Running   33         6d        172.17.0.2    minikube
fabric8-docker-registry-125311296-ghrl8   1/1       Running   17         6d        172.17.0.11   minikube
fabric8-forge-1088523184-k0q82            1/1       Running   17         6d        172.17.0.4    minikube
gogs-2069416242-nc1j6                     1/1       Running   15         6d        172.17.0.8    minikube
jenkins-56914896-5zcl2                    1/1       Running   27         6d        172.17.0.5    minikube
nexus-2230784709-1k9kr                    1/1       Running   17         6d        172.17.0.12   minikube
springboottut-1863166851-0778n            1/1       Running   0          16m       172.17.0.9    minikube

then asking the browser: for http://172.17.0.9:8080 or http://100.0.0.200:8080

  • the connection timed out

I obviously missed something, and the docs dont give me any more hints. Any ideas whats wrong,please? Thanks for any help.

1 Answers

Both addresses (172.* and 10.*) you are trying to access are private IPs that won’t be directly addressable over the public internet.

Your service listed the external IP as pending.

EXTERNAL-IP <pending>

Once that value is filled in by the cloud provider, that value is the public endpoint you should use as the address in your browser. Don't forget to add any necessary port 8080

Related