All Tools View Categories About Contact Privacy

Port Mapping Formatter

Format Kubernetes Service port mappings (port, targetPort, nodePort, protocol) and generate a valid Service.

Runs entirely in your browser - nothing is uploaded and no cluster connection is made.
0
port mappings
Your generated Service YAML will appear here.

About Port Mapping Formatter

Services route traffic to pods by mapping a Service port to a container targetPort. The Port Mapping Formatter writes a valid Service (v1) and documents each mapping so you can see port -> targetPort at a glance.

You set the Service name, type and selector, then add port rows. Each row has a name, protocol, port, targetPort and an optional nodePort (for NodePort/LoadBalancer). The output is a valid core/v1 Service with a reference header.

Names are validated as RFC 1123 labels. Problems are reported in a clear panel. Everything runs locally and nothing is uploaded.

Features

  • Service v1 - correct Service schema.
  • port -> targetPort - clear mapping reference.
  • Named targetPort - numeric or named containerPort.
  • nodePort - optional for NodePort/LoAdBalancer.
  • Validation - RFC 1123 names and required fields.
  • Copy / Download / Print - get service.yaml wherever you need it.

How to Use

  1. Name the Service and pick a type.
  2. Add a selector so the Service finds pods.
  3. Add port rows (port, targetPort, protocol, nodePort).
  4. Watch the preview and export.

Examples

Example 1 - simple. port 80 -> targetPort 8080 (TCP).

Example 2 - named. targetPort http (named containerPort).

Example 3 - NodePort. nodePort 30080.

Benefits

  • Correct schema - valid core/v1 Service.
  • Clear mapping - port -> targetPort documented.
  • Validated - names and required fields checked.
  • Clean output - empty fields omitted.
  • Private - everything runs in the browser.
  • Copy, download or print - get the manifest where you need it.

Frequently Asked Questions

What is targetPort?
targetPort is the port on the backing pod/container that receives traffic. The Service port is what clients connect to; targetPort defaults to the same value if omitted.
Can targetPort be a name?
Yes. targetPort may be a numeric port or the name of a named containerPort on the pod.
What is nodePort?
nodePort is the static port opened on every node for NodePort/LoAdBalancer Services (30000-32767). It is optional and auto-assigned when blank.
Is the name validated?
Yes. The Service name must be a valid RFC 1123 label and at least one port mapping is required.
Does this connect to a cluster?
No. Everything is assembled in your browser and nothing is uploaded.
Can I download it?
Yes. Copy the YAML, download service.yaml, or print it.