Skip to content
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

Minikube instructions added #41

Closed

Conversation

idvoretskyi
Copy link
Contributor

Fixes #40

Signed-off-by: Ihor Dvoretskyi ihor@linux.com

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 31, 2018
@ahmetb
Copy link
Contributor

ahmetb commented Aug 31, 2018

I am ok with removing Docker-for-Desktop altogether! Let’s just talk about Minikube; adding more options just confuse people.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
@idvoretskyi
Copy link
Contributor Author

@ahmetb updated!

@ahmetb
Copy link
Contributor

ahmetb commented Aug 31, 2018

Thanks Ihor!

I have two questions:

  1. Have you built this yourself on minikube? I ask this because sometimes the disk space is too small for building all images.

  2. Is the app accessible on localhost:80 with minikube? (My assumption is: No.) Therefore this part of the docs might be invalid now:

    The application frontend should be available at http://localhost:80 on your machine.

@@ -91,7 +88,7 @@ Find **Protocol Buffers Descriptions** at the [`./pb` directory](./pb).

> 💡 Recommended for demos and making it available publicly.

1. Install tools specified in the previous section (Docker, kubectl, skaffold)
1. Install tools specified in the previous section (kubectl, skaffold)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the diff is not accurate: Skaffold will still need a working docker build locally even if it is deploying to a remote cluster.

I'm tempted to think: for now Docker for Desktop is doing a decent job here and we should probably keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmetb It's fine with keeping DfD, the primary reason why I've added minikube - it's available for Linux.

@ahmetb
Copy link
Contributor

ahmetb commented Sep 4, 2018

I just did

minikube start --vm-driver=xhyve --cpus=3 --memory 4096
skaffold dev

and this brought the apiserver down or something like that, because kubectl to minikube now fails with:

The connection to the server 192.168.64.29:8443 was refused - did you specify the right host or port?

but kubectl worked fine before deploying the artifacts to minikube. :(

minikube ssh still shows the apiserver running but it's clearly not working. journalctl -f also shows kubernetes API is down (kubelet fails to reach it).

@idvoretskyi
Copy link
Contributor Author

idvoretskyi commented Sep 5, 2018

@ahmetb wow, thanks for testing. Will take a look and update the instructions respectively.

@idvoretskyi
Copy link
Contributor Author

@ahmetb it really doesn't work on minikube, and that's weird.

Let's hold the PR now, I'll perform a deeper debugging and update the PR.

@ahmetb
Copy link
Contributor

ahmetb commented Sep 6, 2018

I bumped the limits but no luck. If you have time, feel free to follow up on Minikube repo. I'm still open to this as long as (1) it works (2) localhost:80 or something like that is accessible.

@idvoretskyi
Copy link
Contributor Author

@ahmetb I'll close this PR now. We have an issue #40 opened, where we may track progress.

I'll submit another PR after I'll figure out a workable way to run this on Linux locally.

@dreamspider42
Copy link

Hey guys,
I found this link helpful: https://stackoverflow.com/questions/40767164/expose-port-in-minikube
I was able to finally able to use the example successfully after getting the minikube ip and then hitting the appropriate port such as http://192.168.39.59:30979. I'm still brand new to Kubernetes and this solution, but do think it would be worthwhile offering folks some clear instructions on how to do this in linux if they're looking for it. After some trial and error I got it working locally using the following steps:

  1. Install MiniKube according to the install instructions here
  2. Install the Linux KVM2 driver according to the instructions here
  3. Set the default vm driver to KVM2 with the following command: sudo minikube config set vm-driver kvm2
  4. Install KubeCtl via the following command: sudo snap install kubectl --classic
  5. CHOWN the minikube directory with the following command: sudo chown -R $USER $HOME/.minikube and sudo chown -R $USER $HOME/.kube

Interested if it works for anyone else as well.

@dreamspider42
Copy link

Also had an issue with skaffold trying to push to docker hub so added this and it seemed to resolve: skaffold config set -k minikube local-cluster true

@idvoretskyi
Copy link
Contributor Author

@dreamspider42 It works since minikube v1.0, I'll update the documentation when I'll have time.

@idvoretskyi
Copy link
Contributor Author

@dreamspider42 also, this is not necessary:

CHOWN the minikube directory with the following command: sudo chown -R $USER $HOME/.minikube and sudo chown -R $USER $HOME/.kube

Instructions to run Minikube from this blog post are sufficient - https://kubernetes.io/blog/2019/03/28/running-kubernetes-locally-on-linux-with-minikube-now-with-kubernetes-1.14-support/.

@dreamspider42
Copy link

Yeah, its possible I screwed something up during the minikube install as I couldn't run minikube without sudo and then it wouldn't show me the dashboard. Thanks for the link though. I think the bigger thing is I wasnt sure where to hit the front-end URL via minikube (it wasn't available via localhost:80) without the commands in the other link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using minikube instead of Docker for Desktop for the local setup
4 participants