1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 00:48:01 +01:00
Files
openshift-docs/modules/creating-serverless-apps-kn.adoc
2020-12-07 13:47:26 -06:00

45 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// serverless/serving-creating-managing-apps.adoc
[id="creating-serverless-apps-kn_{context}"]
= Creating serverless applications using the kn CLI
The following procedure describes how you can create a basic serverless application using the `kn` CLI.
.Prerequisites
* {ServerlessOperatorName} and Knative Serving are installed on your cluster.
* You have installed `kn` CLI.
.Procedure
* Create a Knative service:
+
[source,terminal]
----
$ kn service create <service-name> --image <image> --env <key=value>
----
+
.Example command
[source,terminal]
[source,terminal]
----
$ kn service create event-display \
--image quay.io/openshift-knative/knative-eventing-sources-event-display:latest
----
+
.Example output
[source,terminal]
----
Creating service 'event-display' in namespace 'default':
0.271s The Route is still working to reflect the latest desired specification.
0.580s Configuration "event-display" is waiting for a Revision to become ready.
3.857s ...
3.861s Ingress has not yet been reconciled.
4.270s Ready to serve.
Service 'event-display' created with latest revision 'event-display-bxshg-1' and URL:
http://event-display-default.apps-crc.testing
----