After having a local Kubernates up using minikube, I run a series of kubectl commands:
$ kubectl apply -f https://app.getambassador.io/initializer/yaml/0a6624ff-5b39-418f-b61d-7ba83dc3ab7b/crds &&
kubectl wait --for condition=established --timeout=90s crd -lproduct=aes
$ kubectl apply -f https://app.getambassador.io/initializer/yaml/0a6624ff-5b39-418f-b61d-7ba83dc3ab7b/install &&
kubectl wait -n ambassador deploy -lproduct=aes --for condition=available --timeout=90s
$ kubectl apply -f https://app.getambassador.io/initializer/yaml/0a6624ff-5b39-418f-b61d-7ba83dc3ab7b/configure
To see the Ambassador Edge Stack (Ingress and API gateway)
$ kubectl get svc --namespace ambassador
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ambassador LoadBalancer 10.111.43.125 <pending> 80:30130/TCP,443:30217/TCP 8m37s
ambassador-admin ClusterIP 10.111.152.68 <none> 8877/TCP 8m37s
ambassador-redis ClusterIP 10.98.170.102 <none> 6379/TCP 8m38s
The external IP shall be localhost, but it isn’t. Those commands don’t specify the external IP, at least not directly. Is some sort of setting missing in this case?
This question possibly shall be addressed to Ambassador Labs (Datawire) people.
2
Answers
Normally when you create a Service of type LoadBalancer, Kubernetes automatically tries to provision an external load balancer in the cloud environment. Because Minikube does not have a built-in LoadBalancer that it can provision to the ambassador service. There are 2 ways around this.
Use
minikube tunnel
to simulate a load balancer. Depending on your minikube version, this might be either localhost or the cluster IP of the service.Deploy Ambassador as a NodePort Service and do a
kubectl port-forward
so that localhost resolves to the Ambassador service.Minikube has an
ambassador
addon so you don`t have to deploy this like that. All you have to to is to enable it:You can then access it with 3 ways as described in the documents:
With this you will be able to access it via
external-ip
. To get this you can runkubectl get service ambassador -n ambassador
:Note that Minikube does not natively support load balancers. Instead of minikube tunnel you might want to check also
minikube service list
. The output should look like this: