Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
indiepopart committed Mar 30, 2023
1 parent 2e26dd2 commit 81f0207
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
24 changes: 23 additions & 1 deletion generators/kubernetes/__snapshots__/kubernetes.spec.mts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5752,6 +5752,28 @@ This is because the rolling upgrade strategy first stops a running replica in or

The following Keycloak [best practices](https://www.keycloak.org/server/configuration-production) for production are included in the generated k8s: a production grade database PostgreSQL, the \`edge\` deployment mode, high availability through clustered deployment, and \`HOSTNAME\` configuration. HTTP/TLS is not enabled for ease of deployment, but it is required for a secure exchange of credentials and other sensitive data with Keycloak, preventing several attack vectors.

if you are using minikube, install the ingress controller for [cloud deployment](https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke) (the minikube ingress add on does not work on macOS or Windows).

\`\`\`

This comment has been minimized.

Copy link
@mraible

mraible Mar 30, 2023

Contributor

It looks like you need to fix all the code blocks.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.0/deploy/static/provider/cloud/deploy.yaml
\`\`\`

Then run \`minikube tunnel\` in a separate terminal window.
Get the \`ingress-nginx-controller\` external IP:

\`\`\`
kubectl get svc/ingress-nginx-controller -n ingress-nginx
\`\`\`

The output will look like the following:

\`\`\`
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer 10.103.44.162 10.103.44.162 80:30982/TCP,443:32664/TCP 27s
\`\`\`

When running the \`jhipster k8s\` generator, it will prompt for a root FQDN (fully qualified domain name). You can use \`nip.io\` as the DNS provider and set \`<external-ip>.nip.io\`.

## Troubleshooting

> my app doesn't get pulled, because of 'imagePullBackof'
Expand Down Expand Up @@ -8715,7 +8737,7 @@ logSummary() {
echo "#####################################################"
echo "Please find the below useful endpoints,"
echo "Gateway - http://jhgate.default.example.com"
echo "Keycloak - https://keycloak.default.example.com"
echo "Keycloak - http://keycloak.default.example.com"
echo "#####################################################"
}

Expand Down
22 changes: 22 additions & 0 deletions generators/kubernetes/templates/README-KUBERNETES.md.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,28 @@ kubectl scale statefulset jhipster-registry --replicas 3<%= kubernetesNamespaceD
<%_ if (ingressTypeNginx) { _%>
The following Keycloak [best practices](https://www.keycloak.org/server/configuration-production) for production are included in the generated k8s: a production grade database PostgreSQL, the `edge` deployment mode, high availability through clustered deployment, and `HOSTNAME` configuration. HTTP/TLS is not enabled for ease of deployment, but it is required for a secure exchange of credentials and other sensitive data with Keycloak, preventing several attack vectors.
if you are using minikube, install the ingress controller for [cloud deployment](https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke) (the minikube ingress add on does not work on macOS or Windows).
```
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.0/deploy/static/provider/cloud/deploy.yaml
```
Then run `minikube tunnel` in a separate terminal window.
Get the `ingress-nginx-controller` external IP:
```
kubectl get svc/ingress-nginx-controller -n ingress-nginx
```
The output will look like the following:
```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer 10.103.44.162 10.103.44.162 80:30982/TCP,443:32664/TCP 27s
```
When running the `jhipster k8s` generator, it will prompt for a root FQDN (fully qualified domain name). You can use `nip.io` as the DNS provider and set `<external-ip>.nip.io`.
<%_ } _%>
<%_ if (ingressTypeGke) { _%>
Expand Down
5 changes: 5 additions & 0 deletions generators/kubernetes/templates/kubectl-apply.sh.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ logSummary() {
<%_ } _%>
<%_ } _%>
<%_ if (useKeycloak) { _%>
<%_ if (ingressTypeGke) { _%>
echo "Keycloak - https://keycloak.<%= kubernetesNamespace %>.<%= ingressDomain %>"
<%_ } _%>
<%_ if (ingressTypeNginx) { _%>
echo "Keycloak - http://keycloak.<%= kubernetesNamespace %>.<%= ingressDomain %>"
<%_ } _%>
<%_ } _%>
echo "#####################################################"
<%_ } _%>
Expand Down

0 comments on commit 81f0207

Please sign in to comment.