Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmwylie19/two-port-app
https://github.com/cmwylie19/two-port-app
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cmwylie19/two-port-app
- Owner: cmwylie19
- Created: 2022-08-17T16:24:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T20:14:44.000Z (over 2 years ago)
- Last Synced: 2024-06-19T16:35:12.687Z (6 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Two Port App
**Background**: _Work around for OpenShift Routes exposing just one port._
Deploy the app in OpenShift
```bash
kubectl apply -f k8s.yaml
```After deployed, you will see two routes that ultimately route back to the same `two-port-app` service
```bash
kubectl get routes
```output
```bash
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
port-one port-one-default.apps.tetrate-mp-cp.kni.syseng.devcluster.openshift.com two-port-app port-1 None
port-two port-two-default.apps.tetrate-mp-cp.kni.syseng.devcluster.openshift.com two-port-app port-2 None
```Test route one
```bash
curl $(kubectl get route port-one --template='{{ .spec.host }}')/healthz
```output
```bash
OK - Port One
```Test route two
```bash
curl $(kubectl get route port-two --template='{{ .spec.host }}')/healthz
```output
```bash
OK - Port Two
```