6

When exposing a service in minikube it is possible to see its url via the following:

minikube service [-n NAMESPACE] [--url] NAME

How do you achieve the same in microk8s?

Thank you

user2324712
  • 435
  • 3
  • 13
  • I've not used microk8s but get the impression there's not a direct equivalent. See comments on how to access services in https://github.com/ubuntu/microk8s/issues/95 and https://itnext.io/microk8s-puts-up-its-istio-and-sails-away-104c5a16c3c2 – Ryan Dawson Jan 05 '19 at 15:03

2 Answers2

3

Realizing this is an older post, but since I just recently implemented a dev install of MicroK8s, I though perhaps I could provide some of my findings.

Wanting a load balancer, I installed MetalLB, https://metallb.universe.tf/, which provides a baremetal LB for a cluster. While MicroK8s does offer an addon for this, I did a manual installation to help myself gain a better understanding.

I used the Layer 2 Configuration option, https://metallb.universe.tf/configuration/#layer-2-configuration which provided a very simple way to expose my services via a load balancer.

To use the config, I then added an annotation to the services that utilize it, indicating which address pool, which for my deployment, I simply call microk8s_pool.

metallb.universe.tf/address-pool: microk8s_pool
8675309
  • 107
  • 1
  • 2
  • 12
-2

Not sure about microk8s, but in minikube you'd be able to see LoadBalancer services' IP addresses once you run "minikube tunnel" in a separate command shell (and keep it open). Running minikube tunnel, gets the LoadBalancer services exposed to the outsize and then you can see the IPs through "minikube service".

minikube service [-n NAMESPACE] Name
akardon
  • 43,164
  • 4
  • 34
  • 42