-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Kubernetes README for microprofile-health
- Loading branch information
Showing
9 changed files
with
70 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:expose-mgmt-port-kubernetes: true | ||
include::expose-management-port.adoc[] | ||
|
||
//Unset the attribute | ||
:!expose-mgmt-port-kubernetes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:expose-mgmt-port-openshift: true | ||
include::expose-management-port.adoc[] | ||
|
||
// Unset the attribute | ||
:!expose-mgmt-port-openshift: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
ifdef::expose-mgmt-port-openshift[] | ||
:expose-mgmt-port-cli: oc | ||
:expose-mgmt-port-yaml-suffix: openshift | ||
endif::[] | ||
ifdef::expose-mgmt-port-kubernetes[] | ||
:expose-mgmt-port-cli: kubectl | ||
:expose-mgmt-port-yaml-suffix: kubernetes | ||
endif::[] | ||
|
||
This quickstart requires the management port (9990) to be exposed for demo purposes and testing. We do this only to demonstrate the concepts and ease the testing. | ||
|
||
IMPORTANT: It is **not** recommended to expose the management port in a production environment! | ||
|
||
To expose the management porte to manually exposes our service on port 9990 we deploying the following file: | ||
To expose the management port to manually expose our service on port 9990 we deploy the following file: | ||
[source,options="nowrap",subs="+attributes"] | ||
---- | ||
oc apply -f charts/management-openshift.yml | ||
{expose-mgmt-port-cli} apply -f charts/management-{expose-mgmt-port-yaml-suffix}.yml | ||
---- | ||
Once this is deployed you will be able to access the management port via the created `microprofile-health-management` route. | ||
|
||
ifdef::expose-mgmt-port-openshift[] | ||
To get the address of the `microprofile-health-management` route, execute: | ||
[source,options="nowrap",subs="+attributes"] | ||
---- | ||
$ oc get route microprofile-health -o jsonpath="{.spec.host}" | ||
---- | ||
endif::[] | ||
ifdef::expose-mgmt-port-kubernetes[] | ||
To access the management port from outside the cluster, we need to set up a Kubernetes port forward. This is done with the command: | ||
[source,options="nowrap",subs="+attributes"] | ||
---- | ||
{expose-mgmt-port-cli} port-forward service/microprofile-health-management 9990:9990 | ||
---- | ||
Note that the command to create the port-forward will not return, so it is easiest to run this in a separate terminal. | ||
endif::[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters