ansible-for-kubernetes icon indicating copy to clipboard operation
ansible-for-kubernetes copied to clipboard

`minikube service` prevents Ansible playbook from showing URL and finishing

Open Xaeco opened this issue 3 years ago • 5 comments
trafficstars

Page 53 in

Chapter 2 - Automation brings DevOps bliss

Running the playbook

$ ansible-playbook -i inventory main.yml

locks up at this step:

TASK [Expose Hello Go on the host via Minikube] 

when running it outside of Ansible it shows its intentionally holding the process there until you are done with it.

$ minikube service hello-go --url=true --interval=1
šŸƒ  Starting tunnel for service hello-go.
|-----------|----------|-------------|------------------------|
| NAMESPACE |   NAME   | TARGET PORT |          URL           |
|-----------|----------|-------------|------------------------|
| default   | hello-go |             | http://127.0.0.1:46029 |
|-----------|----------|-------------|------------------------|
http://127.0.0.1:46029
ā—  Because you are using a Docker driver on linux, the terminal needs to be open to run it.
^Cāœ‹  Stopping tunnel for service hello-go.

Xaeco avatar Dec 15 '21 23:12 Xaeco

I believe the behavior changed since I originally wrote that bit, so I'll need to update this.

geerlingguy avatar Dec 15 '21 23:12 geerlingguy

I was tempted to find a solution but my experience with minikube is about 24hrs and I want to continue the book before betting too sidetracked 😊

Xaeco avatar Dec 16 '21 00:12 Xaeco

Heh, well I appreciate you leaving notes here, so those who bump into the same issues have a place to find an answer until I get the book updated!

geerlingguy avatar Dec 16 '21 22:12 geerlingguy

Working through the book now and it works if I remove the --url=true flag, though it pops open the browser for me and still doesn't actually log out the url. With the url flag it was basically hanging on that step and not actually exposing the service on the host. Minor thing for the most part. Thanks for the awesome resource @geerlingguy !

lucas-homer avatar Sep 07 '23 18:09 lucas-homer