Open lcardito opened 3 weeks ago
@lcardito : Hello, thanks a lot for trying out the project.
I tried reproducing the issue but I couldn't reproduce it. Could you please check if it works if you use minikube service
command like this?
curl `minikube service helloworld --url`/hello
Maybe application isn't build correctly? Have you packaged your application using mvn package
first? Do you see anything fishy when you do mvn k8s:log
?
Hey @rohanKanojia I am trying to get to the bottom of it. I think my docker setup on the M1 mac might have something todo with it.
From mvn k8s:log
everything looks ok
❯ mvn k8s:log
[INFO] Scanning for projects...
[INFO]
[INFO] -----------< org.eclipse.jkube.quickstarts.maven:helloworld >-----------
[INFO] Building Eclipse JKube :: Quickstarts :: Maven :: Hello World 1.17.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:log (default-cli) @ helloworld ---
[INFO] k8s: Using Kubernetes at https://127.0.0.1:32769/ in namespace null with manifest /Users/card74944/projects/jkube/quickstarts/maven/hello-world/target/classes/META-INF/jkube/kubernetes.yml
[INFO] k8s: Watching pods with selector LabelSelector(matchExpressions=[], matchLabels={app=helloworld, provider=jkube, group=org.eclipse.jkube.quickstarts.maven, app.kubernetes.io/name=helloworld, app.kubernetes.io/part-of=org.eclipse.jkube.quickstarts.maven, app.kubernetes.io/managed-by=jkube}, additionalProperties={}) waiting for a running pod...
[INFO] k8s: [NEW] helloworld-65876ffb54-v8xhr status: Running Ready
[INFO] k8s: [NEW] Tailing log of pod: helloworld-65876ffb54-v8xhr container: hello-world
[INFO] k8s: [NEW] Press Ctrl-C to stop tailing the log
[INFO] k8s: [NEW]
[INFO] k8s: Aug 21, 2024 8:32:19 AM org.eclipse.jkube.sample.helloworld.App main
[INFO] k8s: INFO: Server started on port: 8080
The following command
❯ curl `minikube service helloworld --url`/hello
❗ Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
is pointing me at something similar to https://github.com/kubernetes/minikube/issues/13788#issuecomment-1068640594. Did not manage to make it work yet, I'll spend some more time troubleshooting later on today.
@lcardito : If this issue is blocking you maybe you can try some cloud Kubernetes provider. Red Hat provides a developer sandbox with which you can create a small OpenShift cluster . It's good enough for experimenting.
@rohanKanojia - bingo. As mentioned in the linked issue on darwin looks like we need to access the service via an ssh tunnel. Doing
❯ minikube service helloworld --url
http://127.0.0.1:64657
and then hitting that url with
❯ curl http://127.0.0.1:64657/hello
Hello World%
works.
It is worth it for this project to also update the docs to run those quickstarts on MacOs? (unsure if it's only with M1 macs though..)
@lcardito : Feel free to update the docs to make it easier for newcomers to troubleshoot issues like these.
the doc for this quickstart is not consistent with the rest, we should use always minikube service
to retrieve the valid URL.
@manusa yeah - can you leave it with me? I can put together a PR to make it consistent and add a note for the new mac M1 onwards
Component
Kubernetes Maven Plugin
Task description
Description
Hey team, apologies if this is not the right type. This seems to be a docs issue potentially rather than anything else.
Running the helloworld quickstart
curl
test does not return any response.I've ran all the steps in the README.md for the helloworld quick start. I can see the pod running no issues, however when running the
curl
test I get a "Couldn't connect to server" error.I found a related issue with Micronaut https://github.com/eclipse-jkube/jkube/issues/1429, in the helloworld example as well we might want to update the docs once I can get it running 😄
Expected Behavior
Running the helloworld quickstart
curl
Hello World
Acceptance Criteria
kubectl
command