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

add keycloak to k8s for ingress nginx #21447

Merged
merged 10 commits into from
Apr 26, 2023

Conversation

indiepopart
Copy link
Contributor

Add Keycloak prod deployment to k8s sub-generator for ingress nginx edge option, including PostgreSQL database and clustering. HTTPS/TLS is not configured. This allows testing on minikube.


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mraible
Copy link
Contributor

mraible commented Mar 29, 2023

I've been testing this for the last couple of days and can't get it to work on macOS. I was able to get everything to start on my M1, but I had to build M1-compatible images and deploy those to Docker Hub.

We should change the commands that are output to the console for deploying directly since they don't currently contain -PjibArchitecture=arm64. For example:

./gradlew -Pprod bootJar jib -PjibArchitecture=arm64 -Djib.to.image=mraible/gateway

I've been talking with @indiepopart and ideally, this should work after installing this branch:

First, start Minikube and enable ingress:

minikube start --cpus 6
minikube addons enable ingress
minikube ip

You will need to use the output of minikube ip + .nip.io when prompted. For example, 192.168.58.2.nip.io.

Then, create a microservices stack and run the k8s sub-generator:

take reactive-stack
jhipster jdl reactive-mf
# Deploy images to Docker Hub
rm -rf kubernetes
take k8s
jhipster k8s # choose Ingress and NGINX
./kubectl-apply.sh -f

@mraible
Copy link
Contributor

mraible commented Mar 29, 2023

@indiepopart I think we need to document a couple of things for this PR and Minikube:

  1. That you need to run minikube addons enable ingress.
  2. That it won't work on macOS or Windows. Minikube IP is not externally accessible via Ingress/ Nodeport Servce kubernetes/minikube#13951

The best place to add documentation for Minikube is probably https://www.jhipster.tech/kubernetes/. However, I'm not sure people will see it there, so outputting it to the console might be a good idea too.

@indiepopart
Copy link
Contributor Author

I woud rather change the generator and documentation so it works for also for macOS or Windows. Avoid using the minikube ip and nip.io.

@indiepopart indiepopart marked this pull request as draft March 29, 2023 23:19
@indiepopart
Copy link
Contributor Author

@mraible The README was updated with instructions to use minikube tunnel for exposing the ingress controller to the host. The deployment was only verified on Linux.

@indiepopart indiepopart marked this pull request as ready for review April 3, 2023 16:51
mraible
mraible previously approved these changes Apr 18, 2023
@mraible mraible enabled auto-merge (squash) April 18, 2023 15:38
@mraible mraible merged commit a29197d into jhipster:main Apr 26, 2023
@DanielFran DanielFran added this to the 8.0.0-beta.1 milestone Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants