kubectl expose service code example
Example 1: kubectl run create service
kubectl expose deployment/my-nginx
Example 2: how to expose external ip in kubernetes
kubectl expose deployment hello-world --type=LoadBalancer --name=my-service
Example 3: kubectl run create service
service/my-nginx exposed