This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.2. Deploying a serverless application
To deploy a serverless application, you must apply the service.yaml
file.
Procedure
-
Navigate to the directory where the
service.yaml
file is contained. Deploy the application by applying the
service.yaml
file.oc apply --filename service.yaml
$ oc apply --filename service.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Now that service has been created and the application has been deployed, Knative will create a new immutable revision for this version of the application.
Knative will also perform network programming to create a route, ingress, service, and load balancer for your application, and will automatically scale your pods up and down based on traffic, including inactive pods.
The first time that a Knative service is created in a namespace, that namespace will automatically receive a new networking configuration. This might cause the initial service to take longer than is usually required for a service to become ready.
If the namespace has no existing NetworkPolicy configuration, an "allow all" type policy will be applied automatically. This policy will be removed automatically if all Knative Services are removed from that namespace and no other NetworkPolicy configurations have been applied.