$ oc get ksvc <service_name>
To verify that your serverless application has been deployed successfully, you must get the application URL created by Knative, and then send a request to that URL and observe the output. OpenShift Serverless supports the use of both HTTP and HTTPS URLs, however the output from oc get ksvc
always prints URLs using the http://
format.
To verify that your serverless application has been deployed successfully, you must get the application URL created by Knative, and then send a request to that URL and observe the output. OpenShift Serverless supports the use of both HTTP and HTTPS URLs, however the output from oc get ksvc
always prints URLs using the http://
format.
OpenShift Serverless Operator and Knative Serving are installed on your cluster.
You have installed the oc
CLI.
You have created a Knative service.
Install the OpenShift CLI (oc
).
Find the application URL:
$ oc get ksvc <service_name>
NAME URL LATESTCREATED LATESTREADY READY REASON
event-delivery http://event-delivery-default.example.com event-delivery-4wsd2 event-delivery-4wsd2 True
Make a request to your cluster and observe the output.
$ curl http://event-delivery-default.example.com
$ curl https://event-delivery-default.example.com
Hello Serverless!
Optional. If you receive an error relating to a self-signed certificate in the certificate chain, you can add the --insecure
flag to the curl command to ignore the error:
$ curl https://event-delivery-default.example.com --insecure
Hello Serverless!
Self-signed certificates must not be used in a production deployment. This method is only for testing purposes. |
Optional. If your OpenShift Container Platform cluster is configured with a certificate that is signed by a certificate authority (CA) but not yet globally configured for your system, you can specify this with the curl
command.
The path to the certificate can be passed to the curl command by using the --cacert
flag:
$ curl https://event-delivery-default.example.com --cacert <file>
Hello Serverless!