-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadBalancer support #384
Comments
LoadBalancer services run fine on minikube, just with no real external load balancer created. LoadBalancer services get a node port assigned too so you can access services via Would that cover what you need or is there something more that you'd like to see? |
Ah I didn't know about that feature, cool thanks. |
Why not support that minikube could give some address form internal pool that could be accessible from dev machine? Just to avoid port mapping, and this could make access to services much easier. |
Could the getting started examples be updated to include @jimmidyson 's comment? It would be tremendously helpful if this information were easier to find. |
@bryanerayner PRs are always welcome |
i'm running something like:
but minikube seems to be having an issue exposing the service:
i can access the service via the internal port 31253, but not the exposed 22...?
|
@tony-kerz , it looks like the expected behavior to me... Your pods are available on port 22 inside the cluster and are exposed to the host by the load balancer on a random port (31253 in your example). #38 aims to improve this behavior. |
The `Create an External Load Balancer` readme has a `Finding your IP address` section which describes steps that do not work when running the service in Minikube. @jimmidyson describes how to find your ip address while running in Minikube here: kubernetes/minikube#384 (comment). This change adds this helpful bit to the docs.
FYI, I finally have a doc on implementing this here: #2413 |
* Update Create an External Load Balancer Doc The `Create an External Load Balancer` readme has a `Finding your IP address` section which describes steps that do not work when running the service in Minikube. @jimmidyson describes how to find your ip address while running in Minikube here: kubernetes/minikube#384 (comment). This change adds this helpful bit to the docs. * Update create-external-load-balancer.md * Update create-external-load-balancer.md Add note callout formatting
* Update Create an External Load Balancer Doc The `Create an External Load Balancer` readme has a `Finding your IP address` section which describes steps that do not work when running the service in Minikube. @jimmidyson describes how to find your ip address while running in Minikube here: kubernetes/minikube#384 (comment). This change adds this helpful bit to the docs. * Update create-external-load-balancer.md * Update create-external-load-balancer.md Add note callout formatting
* Update Create an External Load Balancer Doc The `Create an External Load Balancer` readme has a `Finding your IP address` section which describes steps that do not work when running the service in Minikube. @jimmidyson describes how to find your ip address while running in Minikube here: kubernetes/minikube#384 (comment). This change adds this helpful bit to the docs. * Update create-external-load-balancer.md * Update create-external-load-balancer.md Add note callout formatting
@gkubisa I'm having situation similar to @tony-kerz, the EXTERNAL-IP is always pending and EDIT: I resolved the problem, minikube shows the URL and the address works. However, I'd want the URL to use the port number I defined for the load balancer, not a random port. |
The docs for setting up minikube were using the namespaces and resource names from elafros instead of knative. The naming changed slightly, e.g. a knative controller is now called `controller` instead of `knative-serving-controller`, so one of the loops had to be broken into 2 statements. Added steps about redeploying pods after setting up GCR secrets b/c there is a chicken and egg problem where the namespaces must exist before you can setup the secrets, but the secrets must exist before the images can be pulled. The PR that enabled `MutatingAdmissionWebhook` by default (kubernetes/minikube#2547) was merged, but the latest minikube (0.28.0) still did not enable this option by default b/c providing any arugments overrides all of the defaults, so we must still set it explicitly. Made it clear in the setting up knative serving docs that the cluster admin binding is required, not just for istio. Use a `NodePort` instead of a `LoadBalancer` (see kubernetes/minikube#384) - another step along the road to #608.
Great to hear the pending external IP issue can be resolved! Would you mind to share how you did it? |
@steveej .. Run the following commands to get the external IP:
|
A temporary workaround https://github.com/knative/serving/blob/master/docs/creating-a-kubernetes-cluster.md#loadbalancer-support-in-minikube. Any official solution here? |
The documentation above is not available. It's now April 2019 and I am still having this issue of the service being pending. Should I open a new issue? |
It is still available at: The key commands are sudo ip route add $(cat ~/.minikube/profiles/minikube/config.json | jq -r ".KubernetesConfig.ServiceCIDR") via $(minikube ip)
kubectl run minikube-lb-patch --replicas=1 --image=elsonrodriguez/minikube-lb-patch:0.1 --namespace=kube-system |
When creating a LoadBalancer services, why doesn't Minikube just assign a new IP address within the loopback range 127.0.0.0/8? Minikube is mostly for development, so having a loopback address would be sufficient. I vote for 127.42.0.* to keep it outside the normal range of 127.0.0.* and just to reference The Hitchhikers Guide to the Galaxy. |
When using the docker-desktop context provided (k8s v1.16.5 macOS v10.15.4) the EXTERNAL-IP is assigned and I am able to connect from local machine via "http://127.0.0.1:3000":
That does not work when using a context that I create via |
Trying to understand where this is on the roadmap. I understand it's currently not supported but is there opposition to adding it?
Currently a lot of Kubernetes examples uses LoadBalancer. Sure, easy to replace with NodePort, but it would be ideal if we could run those with no modifications on minikube.
Since LoadBalancer is already "cloud dependent", Minikube could likewise just make its own decision, which could be something simple (nginx, mapping to nodeport somehow, etc). Of course it will evolve over time, add Ingress support etc but this is the one feature that would enable a lot of the getting started examples to work:
Getting started examples that use LoadBalancer and not much else:
https://github.com/kubernetes/kubernetes/blob/master/examples/guestbook/frontend-service.yaml
https://github.com/GoogleCloudPlatform/getting-started-python/blob/master/optional-container-engine/bookshelf-service.yaml
http://www.thagomizer.com/blog/2015/07/01/kubernetes-and-deploying-to-google-container-engine.html
The text was updated successfully, but these errors were encountered: