Kahibaro
Discord Login Register

External access to applications

Conceptual models for external access

From an OpenShift point of view there are three progressively “more external” layers:

  1. In-cluster access
    • Pods talk to each other via ClusterIP Services and the cluster network.
    • Already covered in the general networking chapter.
  2. Cluster edge access
    • Traffic reaches the OpenShift ingress routers (implemented via the OpenShift Router / Ingress Controller running as pods).
    • This is where Route and Ingress objects are consumed.
  3. Outside the cluster / Internet access
    • DNS records, public / corporate load balancers, firewalls, and NAT devices direct traffic to the cluster ingress endpoints.
    • This is mostly infrastructure outside OpenShift, but OpenShift exposes the endpoints and certificates that these components use.

“External access to applications” is about how you move from layer 1 to 3 in a controlled, secure, and manageable way.

Main mechanisms for external access

NodePort and LoadBalancer Services

While the “Services and service discovery” chapter explains the basic Service types, here the focus is on when and why they are used specifically for external access.

NodePort

A NodePort Service:

Typical characteristics:

NodePort is usually used for:

LoadBalancer

In cloud or integrated environments, a LoadBalancer Service:

Characteristics:

In OpenShift, LoadBalancer Services are commonly used for:

In many OpenShift deployments, application-level external HTTP(S) access is not done by creating a LoadBalancer per app, but by using Routes and Ingress behind shared ingress controllers.

HTTP(S) external access with Routes

Role of the OpenShift Router / Ingress Controller

OpenShift deploys router pods (Ingress Controllers):

These routers:

External traffic must first reach these routers (via NodePorts, LoadBalancer, or external L4 load balancers); once there, the router uses OpenShift network primitives to reach the application pods.

Route basics in the context of external access

A Route:

Routes are the primary mechanism OpenShift provides to expose HTTP(S) services externally in a cluster-agnostic, OpenShift-specific way.

Key aspects concerning external access:

Route TLS termination and external traffic

External access is not just about connectivity; it also involves encryption and trust. Routes support several TLS termination modes:

  1. Edge termination
    • TLS is terminated at the router (ingress).
    • Browser ↔ Router: HTTPS
    • Router ↔ Application: HTTP (inside the cluster).
    • Certificates live on the router (provided via the Route or operator configuration).

Suitable for:

  1. Passthrough termination
    • Router does not terminate TLS; it passes encrypted bytes through.
    • Browser ↔ Application pod: end-to-end TLS (router just forwards TCP).
    • Application must present the certificate; hostname must match the SNI.

Suitable for:

  1. Re-encrypt termination
    • Router terminates TLS from the client and establishes a new TLS connection to the backend.
    • Browser ↔ Router: HTTPS (public certificate).
    • Router ↔ Application: HTTPS (internal certificate; may be different CA).

Suitable for:

Considerations for external access:

Securing external access at the Route layer

While general security (RBAC, SCCs, network policies) is covered elsewhere, Route-specific considerations include:

Using Kubernetes Ingress with OpenShift

While Route is an OpenShift-specific resource, OpenShift also supports Kubernetes Ingress.

From an external access perspective:

Considerations:

When deciding between Route and Ingress for external access:

DNS and external entry points

DNS configuration patterns

DNS is managed outside OpenShift but is critical to making Routes and LoadBalancer addresses usable:

  1. Wildcard DNS for app domain
    Example:
    • *.apps.example.com → resolves to one or more ingress endpoints (IP(s) of the OpenShift routers / external LB).
    • OpenShift-generated and custom Routes under *.apps.example.com become reachable without per-host DNS records.
  2. Individual DNS records
    Example:
    • myapp.example.com → ingress endpoint.
    • You then define a Route myapp.example.com pointing to the Service.
  3. Split-horizon DNS
    • Internal users resolve to internal ingress IPs.
    • External users resolve to public ingress IPs or a different cluster.
    • Useful for internal-only vs internet-facing variants.

From the application’s perspective, external access generally assumes DNS is correctly configured to map hostnames used in Routes/Ingress objects to the relevant ingress IPs or load balancer DNS names.

External load balancers and firewalls

Often, there is an external load balancer (hardware or cloud-based) in front of OpenShift routers:

For external access design, you need to consider:

OpenShift itself does not configure external LBs or firewalls, but exposes:

These are then consumed by infrastructure teams when configuring external access.

Common external access patterns

Simple public web application

Characteristics:

Typical pattern:

  1. Cluster has a default *.apps.example.com wildcard DNS pointing at its ingress.
  2. Developer:
    • Creates a Service for the app.
    • Creates a Route myshop.apps.example.com to that Service, with edge or re-encrypt TLS.
  3. No additional DNS records required, as hostname is under the wildcard.

Corporate-internal application

Characteristics:

Pattern:

Custom domain with public DNS and certificates

Characteristics:

Pattern:

  1. Infrastructure team configures:
    • app.example.com → external load balancer fronting OpenShift routers.
  2. Developer:
    • Creates a Route app.example.com with appropriate TLS cert (possibly a certificate provided by infra/security team).
  3. Application is reachable via the custom domain, independently of cluster-generated hosts.

Non-HTTP/TCP services

Some workloads need external access for protocols like:

These are typically not exposed via Routes, but via:

Considerations:

Operational considerations for external access

Environments and lifecycle

External exposure strategy often differs by environment:

Automation and GitOps

For large environments:

Auditing and compliance aspects

From an audit/compliance perspective, external access raises questions like:

Maintaining an inventory of:

is a common operational practice for regulated environments.

Summary

External access to applications in OpenShift is primarily about:

The combination of these elements lets you expose only the right applications, in the right way, to the right users, while keeping the rest of the cluster safely internal.

Views: 11

Comments

Please login to add a comment.

Don't have an account? Register now!