Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 2.62 KB

serverless-applications.adoc

File metadata and controls

75 lines (58 loc) · 2.62 KB

Serverless applications

modules/common-attributes.adoc :context: serverless-applications

To deploy a serverless application using {ServerlessProductName}, you must create a Knative service. Knative services are Kubernetes services, defined by a route and a configuration, and contained in a YAML file.

Example Knative service YAML
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: hello (1)
  namespace: default (2)
spec:
  template:
    spec:
      containers:
        - image: docker.io/openshift/hello-openshift (3)
          env:
            - name: RESPONSE (4)
              value: "Hello Serverless!"
  1. The name of the application.

  2. The namespace the application uses.

  3. The image of the application.

  4. The environment variable printed out by the sample application.