kubectl expose pod code example
Example 1: kubectl create pod
kubectl run <pod-name> --image=<image> --restart=Never
Example 2: how to expose external ip in kubernetes
kubectl expose deployment hello-world --type=LoadBalancer --name=my-service
kubectl run <pod-name> --image=<image> --restart=Never
kubectl expose deployment hello-world --type=LoadBalancer --name=my-service