Add more IP's into minikube

9/27/2019

I want to add some new ip addresses into my (local) minikube, to expose services on different IP's, which should be accessible from the cluster.

I need to send some request to the pods inside my cluster. Because the cubernet internal DNS system is not accessible from the outside, such as internally: "http://.default.svc.cluster.local/get_endpoint". So my idea is to make all these externally available via loadbalancer

With the command "minikube ip", I get the IP of the cluster, but i want more

-- proKress
kubernetes
minikube
virtual-ip-address

1 Answer

9/30/2019

Adding multiple IPs bound to the minikube VM has absolutely nothing in common with the Pod and Service IPs that kubernetes uses.

If you want to expose a Service onto an external IP address, that’s outside of your cluster.

Kubernetes ServiceTypes allow you to specify what kind of Service you want. The default is ClusterIP.

Type values and their behaviors are:

  • ClusterIP: Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType.
  • NodePort: Exposes the Service on each Node’s IP at a static port (the NodePort). A ClusterIP Service, to which the NodePort Service routes, is automatically created. You’ll be able to contact the NodePort Service, from outside the cluster, by requesting :.
  • LoadBalancer: Exposes the Service externally using a cloud provider’s load balancer. NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created.
  • ExternalName: Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up.

You can also use Ingress to expose your Service. Ingress is not a Service type, but it acts as the entry point for your cluster. It lets you consolidate your routing rules into a single resource as it can expose multiple services under the same IP address.

Take a look at: minikube, exposing-ip, services-types.

-- MaggieO
Source: StackOverflow