I want to know what are production alternatives to make this accessible http://host_machine_ip:8007 here

I have set up minikube cluster with mobile-api service on it.

minikube service mobile-api-service --url this returns

curl returns


so my API is accessible on from the host machine.

but i want to make it accessible http://host_machine_ip:8007.

when I do

kubectl port-forward --address service/mobile-api-service 8007:8007

it makes http://host_machine_ip:8007 work as I want but I am sure this is not a production-like case.


apiVersion: v1
kind: Service
  name: mobile-api-service
    app: mobile-api
  type: LoadBalancer
    - protocol: TCP
      port: 8007
      targetPort: 8007
      nodePort: 30001

this is service it is loadBalancer

2 Answers 2


Either make service/mobile-api-service of LoadBalancer type or use Kubernetes Ingress to expose the workload to external connectivity. Using LoadBalancer service would be the easiest. However, your cloud provider needs to support provisioning LoadBalancers.

I described a demo of Kubernetes Ingress. The post also talks about Kubernetes Load Balancer service limitations.

To play with minikube loadbalancers use minikube tunnel command.


You can try and experiment with metallb and use Loadbalancer service Another option is to use node port with external Loadbalancer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.