[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: setting up routes





On 21. 03. 2017 08:59, Tim Dudgeon wrote:
Looks like the console and api is still active on port 8443 but nothing on port 80 or 8080. The route definition says:
This target port will route to Service Port 8080 → Container Port 8080 (TCP).


Yes, that's expected. Port 8443 is where the API server is. Check if the router is running by logging in as system:admin and listing pods in the default namespace:

$ oc login -u system:admin
Logged into "https://192.168.99.100:8443" as "system:admin" using existing credentials.
...

$ oc get pods -n default
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-1-txi1v   1/1       Running   0          2m
router-1-zoiew            1/1       Running   0          2m

If it is, just verify it is actually using hostPort 80 and 443:

$ oc get po router-1-zoiew -n default -o yaml | grep hostPort
      hostPort: 80
      hostPort: 443
      hostPort: 1936


Marko

Tim


On 20/03/2017 19:37, Graham Dumpleton wrote:
The xip.io address sometimes will not resolve if you are working inside of a corporate LAN network. Don't know what they do with the corporate LAN, but it blocks the DNS lookup for it somehow.

Try using a DNS client to lookup up the name, e.g.:

$ dig parksmap-katacoda-my-project.192.168.64.18.xip.io

; <<>> DiG 9.8.3-P1 <<>> parksmap-katacoda-my-project.192.168.64.18.xip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48502
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;parksmap-katacoda-my-project.192.168.64.18.xip.io. IN A

;; Query time: 228 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Tue Mar 21 06:34:53 2017
;; MSG SIZE  rcvd: 67

When xip.io is blocked often nip.io still works.

$ dig parksmap-katacoda-my-project.192.168.64.18.nip.io

; <<>> DiG 9.8.3-P1 <<>> parksmap-katacoda-my-project.192.168.64.18.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25226
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;parksmap-katacoda-my-project.192.168.64.18.nip.io. IN A

;; ANSWER SECTION:
parksmap-katacoda-my-project.192.168.64.18.nip.io. 14400 IN A 192.168.64.18

;; Query time: 210 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Tue Mar 21 06:35:19 2017
;; MSG SIZE  rcvd: 83

I am not sure if minishift exposes the ability to easily override the public hostname that apps are made available when first starting it up.

Graham

On 21 Mar 2017, at 6:23 AM, Marko Lukša <marko luksa gmail com> wrote:

Actually, parksmap-katacoda-my-project.192.168.64.18.xip.io gets resolved to 192.168.64.18. If that's the IP of your minishift VM and the OpenShift router is running and accepting connections on port 80, you should be able to access your service through that URL.


On 20. 03. 2017 16:56, Tim Dudgeon wrote:
I've come across a couple of scenarios where the default routes that are created for an app do now work correctly, and I'm not sure how this should be done.

For instance, when running minishift on a Mac (using Docker Mac, thus accessing through the xhyve VM) you can connect to the OpenShift console OK, and deploy an app (I chose the parksmap-katacoda demo app) OK. But when you try to set up the route to this app I hit problems. The default settings generate a URL that cannot be resolved (e.g. http://parksmap-katacoda-my-project.192.168.64.18.xip.io/   - clearly the local 192.* IP address is not going to be resolvable) , and I can't figure out how to set this up correctly.

Can someone point me in the right direction?

Tim

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users
_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]