OpenStack

3 Mins Read

OpenShift Route : Seamlessly Expose Your Applications

Voiced by Amazon Polly

Introduction

In the dynamic world of container orchestration, managing and exposing network traffic efficiently is crucial. OpenShift, built on Kubernetes, simplifies this process with Routes — a powerful way to expose your applications to external traffic. In this blog, we’ll take you through a beautiful and detailed journey of creating Routes in OpenShift, ensuring your applications are accessible, secure, and well-optimized.

Learn from Industry Certified DevOps Experts and Become a Certified DevOps Professional with a High Paying Job

  • Experienced Authorized Instructor led Training
  • Live Hands-on Labs
Enroll now

Why Routes Matter in OpenShift

Routes in OpenShift provide a user-friendly and scalable way to access your services from outside the cluster. Whether you’re managing simple HTTP traffic or securing connections with TLS encryption, Routes offer a flexible and powerful mechanism for traffic control.

Here’s what Routes offer:

  • External Access: Seamlessly expose your services to the outside world.
  • TLS Termination: Secure your applications with HTTPS traffic.
  • Custom Hostnames: Assign user-friendly URLs for better accessibility.
  • Path-Based Routing: Direct specific traffic to designated application endpoints.

Step-by-Step Lab: Creating a Route in OpenShift

  • Open your browser and navigate to the OpenShift web console URL.
  • Log in using your credentials.

  • In the left-hand navigation menu, expand Networking, and select Services

 

  • Click the Create Service

  • Define the Service Details in the YAML, and click on Create

  • Once created, the Service will appear on the service page.
  • Now go to Routes. In the left-hand navigation menu, expand Networking.
  • Click on Routes.

  • Click the Create Route button.

  • Define the Route Details:
  • Name: Enter a name for the route (e.g., nginx-route).
  • Service: Select the service associated with the nginx-deployment (e.g., nginx-deployment).
  • Target Port: Choose the port exposed by the service (e.g., 80 for HTTP).
  • Hostname (Optional):
  • By default, OpenShift generates a hostname for the route.
  • If you want a custom hostname, enter it in the Hostname field (e.g., nginx.example.com).
  • Specify a path if the route should serve only a specific URI (e.g., /app). (Optional):
  • TLS Configuration (Optional):
  • If the route should use HTTPS, configure TLS settings. You can select:
    • Edge: Terminate TLS at the router.
    • Passthrough: Pass encrypted traffic directly to the backend.
    • Reencrypt: Terminate and reencrypt traffic between the router and backend.
  • Click Create to finalize the route.

  • Once created, the route will appear in the Routes list.
  • The route’s URL will be displayed under the Location.
  • Click on the URL to verify it redirects to your NGINX application.

Services vs Routes in OpenShift

Conclusion

Creating a Service and Route in OpenShift is a straightforward process that enables you to expose your applications to external users. By following the steps outlined in this guide, you can easily configure Services and Routes for your deployments, ensuring seamless communication and accessibility.

Routes in OpenShift are a powerful feature that goes beyond basic Kubernetes Ingress, offering advanced routing, security, and customization options. Whether you’re running a simple HTTPD application or a complex microservices architecture, OpenShift provides the tools you need to manage your applications effectively.

Attend 8+ DevOps and Kubernetes Certification Trainings and become a Certified DevOps expert

  • Experienced Authorized Instructor led Training
  • Live Hands-on Labs
Subscribe now

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFrontAmazon OpenSearchAWS DMSAWS Systems ManagerAmazon RDS, and many more.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!