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

Running midpoint-live-demo-setup.sh #1

Open
Cykllon opened this issue Jun 5, 2023 · 5 comments
Open

Running midpoint-live-demo-setup.sh #1

Cykllon opened this issue Jun 5, 2023 · 5 comments

Comments

@Cykllon
Copy link

Cykllon commented Jun 5, 2023

When running script I get two errors. I have kubernetes and it is working so I don't understand how can i get error "kubectl: command not found". Please help.
image

@janmederly
Copy link
Contributor

Hi, @Cykllon could you please provide more information about your environment?
What k8s distribution do you use?
What version of kubectl do you have?
Do you use wsl or some interpreter, if yes, what version do you use?
At first look, it may be caused by running the bash script in the wsl environment where kubectl isn't installed, while running the kubectl command in the windows environment.

@Cykllon
Copy link
Author

Cykllon commented Jun 5, 2023

Maybe I should have started differently. I'm wandering in the dark trying to run this demo at my place. I am working on windows 10, what should I do to make it work?

@janmederly
Copy link
Contributor

Sorry, I didn't put prerequisites to the readme but it wasn't developed for windows 10. I could still check and test it in my own environment but I really need to know what k8s cluster you use because there were some distributions that still had some bugs that needs to be fixed and also there were some with which I have not tested this script.

@Cykllon
Copy link
Author

Cykllon commented Jun 5, 2023

minikube ( I followed this instruction https://minikube.sigs.k8s.io/docs/start/).
I am using WSL 2 with Ubuntu 22.04.2 LTS.
What system does it work best with?

@janmederly
Copy link
Contributor

janmederly commented Jun 6, 2023

Hi, it was developed mainly for linux and original k8s and microk8s. But I checked and it should work with windows 10 with wsl and minikube also.
But there are a few steps that you should follow (I am going to add these also to the readme):

  1. When running the setup script it runs in wsl environment where you don't have kubectl installed. So you have two options to resolve this:
    a) install kubectl in wsl and copy configuration from windows,
    b) Replace the kubectl command in setup script with the path to kubectl.exe. To do so find the kubectl.exe location in windows with where.exe kubectl and then replace "kubectl" in the startup script with the output of that command, also replace C:\ with /mnt/c/ and "" with "/" and directories with multiple words in name put into single quotes (for example C:\Program Files\Docker\Docker\resources\bin\kubectl.exe was my output and I edited it to /mnt/c/'Program Files'/Docker/Docker/resources/bin/kubectl.exe and then replaced "kubectl" with this). I think this is a more straightforward solution.
  2. Minikube does not have an installed ingress controller by default so you should enable it: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
  3. Run setup script. Now wait till the midpoint starts. On a multinode k8s cluster this is about 3-4 minutes, on a single node cluster running on vm it was more like 10-20 minutes. Then you can try to add minikube ip to the hosts file so you can access midpoint with demo.example.com, but there were some problems in windows and minikube, I am going to look into it in a while. Alternatively, you can use port forwarding, this method should work. For more info please read minikube documentation https://minikube.sigs.k8s.io/docs/start/
    Note: this demo may need more than 2 CPU cores and 2 GB of memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants