How do you expose pods/containers to outside world in Kubernetes
To expose Kubernetes pods and containers to the outside world, you typically use Services, specifically the NodePort or LoadBalancer types. NodePort exposes the service on each node’s IP at a static port, while LoadBalancer uses a cloud provider’s load balancer for external access
NodePort: Exposes the service on a specific port on each node in the cluster. You’ll then access your application by connecting to the Node’s IP address and the specified port.
·LoadBalancer: Uses a cloud provider’s load balancer to create an external IP address for your service. This is often the preferred method for exposing services to the internet, as it provides a more stable and scalable external entry point