Skip to content

Add port names to describe pod #1755

Open
@saska

Description

@saska

What would you like to be added:
Using kafka as an example since that's where I last ran into this.

When running describe pod, the port string something akin to:

Ports:          9093/TCP, 9092/TCP, 9094/TCP

I'd like this to include the names of the ports.

Why is this needed:
To eliminate some detective work when wanting to e.g. create a service for it and wanting to use the named ports as well as have a quick reference to what each port is used for. Not a huge deal when you know where in the manifest you wrote that port name but when you're using external stuff via e.g. helm I usually just end up going directly to the source and then cross referencing through default values and things.

Not a huge thing obviously, can also always just use the port number itself but if I could read something like

Ports:          9093/TCP (controller), 9092/TCP (client), 9094/TCP (interbroker)

directly off the describe that'd save a bunch of hassle. Don't necessarily know whether that's a clear enough format but clean-ish and clear enough to get the point across I think.

I can make a PR for this as well but as the contributing seemed to have some hoops I wanted to make sure someone else thinks this is a good idea (or can point me to an easy way to access this information with the current kubectl) first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions