To create a serverless application by using YAML, you must create a YAML file that defines a
Service resource, then apply it by using
Create a YAML file containing the following sample code:
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:latest
- name: RESPONSE
value: "Hello Serverless!"
Navigate to the directory where the YAML file is contained, and deploy the application by applying the YAML file:
After the service is created and the application is deployed, Knative creates an immutable revision for this version of the application.
Knative also performs network programming to create a route, ingress, service, and load balancer for your application and automatically scales your pods up and down based on traffic, including inactive pods.