diff --git a/rosa-content/300-app/deploy.md b/rosa-content/300-app/deploy.md index 6e927d4..537c69b 100644 --- a/rosa-content/300-app/deploy.md +++ b/rosa-content/300-app/deploy.md @@ -218,6 +218,17 @@ You can also get the the URL for your application using the command line: ```bash oc -n microsweeper-ex get route microsweeper-appservice -o jsonpath='{.spec.host}' ``` +### Use HTTPS + +As you can see application is accesible only by HTTP, to change configuration to use HTTPS, run: +```bash +oc patch route microsweeper-appservice --patch '{"spec":{"tls":{"termination":"edge"}}}' +``` +To make sure that every HTTP request are redirected to HTTPS run: +```bash +oc patch route microsweeper-appservice --patch '{"spec":{"tls":{"insecureEdgeTerminationPolicy":"Redirect"}}}' +``` +You can find more information of route behaviour/configuration [here](https://docs.openshift.com/rosa/networking/routes/secured-routes.html) ### Application IP Let's take a quick look at what IP the application resolves to. Back in your Cloud Shell environment, run the following command: @@ -239,4 +250,4 @@ Address: 40.117.143.193 Notice the IP address; can you guess where it comes from? -It comes from the ROSA Load Balancer. In this workshop, we are using a public cluster which means the load balancer is exposed to the Internet. If this was a private cluster, you would have to have connectivity to the VPC ROSA is running on. This could be via a VPN connection, AWS DirectConnect, or something else. \ No newline at end of file +It comes from the ROSA Load Balancer. In this workshop, we are using a public cluster which means the load balancer is exposed to the Internet. If this was a private cluster, you would have to have connectivity to the VPC ROSA is running on. This could be via a VPN connection, AWS DirectConnect, or something else.