Routes and Ingress
Use Score to manage routes for your workload.
On this page
Many workloads are exposed by a DNS name to services running outside the cluster.
The Humanitec Platform Orchestrator supports the route
resource type which can be used to define paths that are used by a Kubernetes Ingress controller or other system such as a Service Mesh or Gateway to route traffic from the Load Balancer that the DNS name resolves to the workload.
Overview #
The Score Specification allows you to define a set of resources that a workload depends on.
For example, a route
resource defines the path and the port on the workload to resolve to.
The route
resource is itself dependent on the host
defined by a dns
resource.
apiVersion: score.dev/v1b1
metadata:
name: hello-world
containers:
container-id:
image: nginx
resources:
my-dns:
type: dns
my-route:
type: route
params:
host: ${resources.my-dns.host}
path: /products
port: 80
For cases where there is a complex set of routes for a workload, multiple route
resources can be defined.
host
parameter of the route
resource is a reference to a DNS resource.
Hard coding a DNS name will result in the ingress not being properly generated.