Section: Services and Ingress

Expose pod as service

bash
bash
kubectl expose pod debug-shell --port=8080 --target-port=8080 --name=debug-shell-svc -n tools
Explanation

Create a service from an existing pod.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Services and Ingress
List services
Show services across namespaces.
OpenIn sheetbashsame section
Describe service
Inspect selectors, endpoints, ports, and type.
OpenIn sheetbashsame section
List endpoints
Show service endpoint IPs.
OpenIn sheetbashsame section
List EndpointSlices
Inspect EndpointSlice objects used for service discovery.
OpenIn sheetbashsame section
List ingresses
Show ingress resources across namespaces.
OpenIn sheetbashsame section
Describe ingress
Inspect rules, backends, and events.
OpenIn sheetbashsame section