kubectl expose deployment
kubectl expose deployment <name> --port=<port> [--target-port=…] [--type=…]
Risk: Careful
What it does
Makes a Service: one order number for all matching pods.
When to use it
Other pods need a stable name to reach your app.
Example
$ kubectl expose deployment shop --port=80Give the shop the order number shop.
Learn it in: Services: one order number · Official docs