Validate Kubernetes Service Type Configuration

Check service.type, service.port, and related settings in Helm values.yaml. Validate against ClusterIP, NodePort, LoadBalancer, and ExternalName types.

Basic Configuration

Detailed Explanation

Service Type Configuration

The service section in Helm values controls how your application is exposed within or outside the Kubernetes cluster. Incorrect values here can leave your service unreachable or accidentally expose it to the internet.

Valid Service Types

# ClusterIP (default) - internal only
service:
  type: ClusterIP
  port: 80

# NodePort - exposes on each node's IP
service:
  type: NodePort
  port: 80
  nodePort: 30080

# LoadBalancer - provisions external LB
service:
  type: LoadBalancer
  port: 80

# ExternalName - DNS alias
service:
  type: ExternalName
  externalName: api.external-service.com

What Gets Validated

  1. Type value: Must be exactly one of ClusterIP, NodePort, LoadBalancer, or ExternalName (case-sensitive)
  2. Port type: service.port should be a number
  3. Consistency: If ingress is enabled, service type should typically be ClusterIP (the ingress controller handles external access)

Common Mistakes

Mistake Issue Fix
type: clusterIP Wrong casing type: ClusterIP
type: Headless Not a valid type Use type: ClusterIP with clusterIP: None
port: "80" String instead of number port: 80
LoadBalancer + Ingress Redundant Use ClusterIP with Ingress

NodePort Range

When using NodePort, the nodePort value must be in the range 30000-32767 (configurable per cluster). The validator flags nodePort values outside this range.

Use Case

Reviewing service configuration before deploying to different environments where ClusterIP is needed for staging (behind an ingress) but LoadBalancer is needed for a bare-metal production cluster.

Try It — Helm Values Validator

Open full tool