0

I'm totally new in openSHIFT and a newbie in DevOps technologies.

I have a containerized asp.net core web api app that is running on openSHIFT ORIGIN platform.

Now, I have a task to expose this container to our team member to test the service. As far as I understand I have to make some routes to make the service available for testing. But I don't have a clue how to do it.

Is there any guide that can helps me out?

Dmitry Stepanov
  • 2,776
  • 8
  • 29
  • 45
  • 1
    Have you tried learn.openshift.com and read the free eBooks such as https://www.openshift.com/promotions/deploying-to-openshift.html – Graham Dumpleton Sep 17 '18 at 12:11
  • I created a service via web console and added a route with a "oc expose service/myservice-api" command. Now the created route has the following hostname: "myservice-api.router.default.svc.cluster.local". As far as I understand this is an address which can be used by applications from other projects to access this service but not for the public usage. – Dmitry Stepanov Sep 18 '18 at 09:55
  • Normally yes, but if that is the hostname on the route, it looks like your cluster has been set up incorrectly. The hostname ``router.default.svc.cluster.local`` will only work inside of the cluster. The hostname you configure for the router should be a host which is resolvable outside of the cluster. So something wrong in the cluster master config. – Graham Dumpleton Sep 18 '18 at 09:58
  • If you only want to access it from inside of the cluster, you just need to use the service host name. Eg. ``myservice-api.projectname.svc.cluster.local``. Although if wanting to access from different projects, you will need to set up pod networks so that projects can talk to each other. Are you wanting to expose the service outside of the cluster, or just internally. – Graham Dumpleton Sep 18 '18 at 10:01
  • I need to make it public (from outside of a cluster) to allow users run my api service. I will try to find some info how to change cluster master config... – Dmitry Stepanov Sep 18 '18 at 10:04
  • Is that **openshift_master_cluster_hostname** variable (documentation says that this variable overrides the host name for the cluster, which defaults to the host name of the master) that I have to change? How can I view the current value of this variable and change it ? I'm stuck on it. – Dmitry Stepanov Sep 18 '18 at 13:26

0 Answers0