podman play kube should NOT bind ports when hostPort is not specified. #18576
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Issue Description
Expected behavior:
podman play kube
should only bind container port to the pod port when onlycontainerPort
was specified, but the pod port shouldn't bind to the host port.Actual behavior:
podman play kube
binds container port to the host even ifhostPort
were not specified in the pod spec.The reason being that there are orchestrations that only exposes an internal service to another internal service, for example, an application server that only talks to a nginx reverse proxy. This has security implication because the reverse proxy may implement authentication of the service.
The behavior is also documented at https://kubernetes.io/docs/concepts/configuration/overview/
This was correctly implemented in earlier version of podman, but was changed at request of an erroneous bug report:
Erroneous previous bug report: #15942
Merge request that changed the behavior: #15946
Steps to reproduce the issue
Steps to reproduce the issue
podman play kube
this YAML spec:Describe the results you received
podman ps
shows0.0.0.0:443->443/tcp
when it's not supposed to.Describe the results you expected
podman ps
should show no exposed ports.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: