1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/creating-serverless-apps-kn.adoc
2020-09-30 18:43:42 +00:00

50 lines
1.1 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]
----
$ kn service create hello --image docker.io/openshift/hello-openshift --env RESPONSE="Hello Serverless!"
----
+
.Example output
+
[source,terminal]
----
Creating service 'hello' in namespace 'default':
0.271s The Route is still working to reflect the latest desired specification.
0.580s Configuration "hello" is waiting for a Revision to become ready.
3.857s ...
3.861s Ingress has not yet been reconciled.
4.270s Ready to serve.
Service 'hello' created with latest revision 'hello-bxshg-1' and URL:
http://hello-default.apps-crc.testing
----