Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Deploying functions
You can deploy your functions to the cluster by using the kn func tool.
4.1. Deploying a function Link kopierenLink in die Zwischenablage kopiert!
You can deploy a function to your cluster as a Knative service by using the kn func deploy command. If you have already deployed the function, the command pushes a new container image to a container image registry and updates the Knative service.
Prerequisites
- You have installed the OpenShift Serverless Operator and Knative Serving on the cluster.
-
You have installed the Knative (
kn) CLI. - You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
- You must have already created and initialized the function that you want to deploy.
Procedure
Deploy a function:
$ kn func deploy [-n <namespace> -p <path> -i <image>]You get an output similar to the following example:
Function deployed at: http://func.example.com-
If you do not specify a
namespace, the command deploys the function in the current namespace. -
The command deploys the function from the current directory unless you specify a
path. - The command derives the Knative service name from the project name. You cannot change the service name by using this command.
-
If you do not specify a
You can create a serverless function with a Git repository URL by using Import from Git or Create Serverless Function in the +Add view.