1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00
Files
openshift-docs/modules/serverless-deploy-func-kn.adoc
2021-09-16 15:24:13 +00:00

29 lines
930 B
Plaintext

[id="serverless-deploy-func-kn_{context}"]
= Deploying functions
You can deploy a function to your cluster as a Knative service by using the `kn func deploy` command.
If the targeted function is already deployed, it is updated with a new container image that is pushed to a container image registry, and the Knative service is updated.
.Prerequisites
* You must have already initialized the function that you want to deploy.
.Procedure
* Deploy a function:
+
[source,terminal]
----
$ kn func deploy [-n <namespace> -p <path> -i <image> -r <registry>]
----
+
.Example output
[source,terminal]
----
Function deployed at: http://func.example.com
----
** If no `namespace` is specified, the function is deployed in the current namespace.
** The function is deployed from the current directory, unless a `path` is specified.
** The Knative service name is derived from the project name, and cannot be changed using this command.