Skip to main content
Web services are HTTP-based services that can be exposed publicly or kept private within your cluster. This is a complete reference for all fields that can be set for a web service in porter.yaml.

Field Reference


Basic Example


loadBalancers

array Optional The load balancers that serve the web service. Use this field if the service must receive traffic from outside the cluster. Each item is a mode. Write each mode as a simple string. The private_lb mode needs a private load balancer on the cluster. If a private service has custom domains, the cluster must also have DNS credentials. Porter uses these credentials to issue the certificates. The public_alb mode needs an application load balancer on the cluster. The domains of the service must be below one of the root domains of that load balancer.

private

boolean Optional If private is true, the service has no load balancer. The service has no external address, public or private. Only other workloads in the cluster can send traffic to it, at its internal URL.
This is the only condition that loadBalancers does not include, so private: true continues to be available. Set all other conditions with loadBalancers, including the private load balancer of the cluster. The private load balancer is the private_lb mode, not this field. Do not set both fields. If you set both fields, Porter reads the list and ignores the flag.

loadBalancerConfig

object Optional
Do not use this field. Use loadBalancers, which also supports the public_alb mode.
This field has one field, mode. The mode field accepts public_lb or private_lb. Existing services continue to operate. Porter reads this field if loadBalancers is not present. The dashboard replaces this field at the next save. Use loadBalancers for new services. Only loadBalancers can select the public_alb mode.

disableTLS

boolean Optional Disable TLS termination at the load balancer. Only use this for services that handle their own TLS or for internal testing.
Disabling TLS exposes your service over HTTP. Only use this when you have a specific requirement.

autoscaling

object Optional Configure horizontal pod autoscaling based on CPU and memory utilization. See Autoscaling Configuration for full documentation.

domains

array Optional Configure custom domains for your web service.

healthCheck

object Optional Configure a combined health check that applies to liveness, readiness, and startup probes.
Cannot be used together with livenessCheck, readinessCheck, or startupCheck. Use either the combined healthCheck or the individual checks.
For best practices on combining health checks with graceful shutdown for zero-downtime deployments, see Zero-Downtime Deployments.

Advanced Health Checks

For fine-grained control, configure liveness, readiness, and startup probes separately.

livenessCheck

object Optional Determines if the container should be restarted.

readinessCheck

object Optional Determines if the container is ready to receive traffic.

startupCheck

object Optional Used for slow-starting containers. Other probes are disabled until this passes.

pathRouting

array Optional Configure path-based routing to direct requests to different ports or services.
A path must be specified for the default port set in services.port.

pathRoutingConfig

object Optional Configure path rewriting behavior for path-based routing. Rewrite Modes:

ingressAnnotations

object Optional Add custom NGINX ingress annotations for advanced configuration.
Common use cases include increasing upload limits, configuring timeouts, and enabling WebSocket support.

connections

array Optional Connect to external cloud services. See Connections Configuration for full documentation.

serviceMeshEnabled

boolean Optional Enable service mesh for enhanced inter-service communication with improved performance, reliability, and monitoring.
Recommended for applications with multiple services that communicate with each other, especially those using gRPC or WebSockets.

metricsScraping

object Optional Configure Prometheus metrics scraping for custom application metrics.

terminationGracePeriodSeconds

integer Optional Seconds to wait for graceful shutdown before forcefully terminating the container.
Increase this value for services that need time to complete in-flight requests or cleanup tasks.

gpuCoresNvidia

integer Optional Allocate NVIDIA GPU cores for ML inference or GPU-accelerated workloads.
Requires a node group with GPU-enabled instances.

Complete Example