Serverless computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.
(https://en.wikipedia.org/wiki/Serverless_computing)
build, serving, eventing
Zarządzanie za pomocą CRD
kind: Build metadata: name: example-build-name spec: serviceAccountName: build-auth-example source: git: url: https://github.com/example/build-example.git revision: master steps: - name: ubuntu-example image: ubuntu args: ["ubuntu-build-example", "SECRETS-example.md"]
Kubernetes-based, scale-to-zero, request-driven compute
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: helloworld-java
  namespace: default
spec:
  runLatest:
    configuration:
      revisionTemplate:
        spec:
          container:
            image: docker.io/{username}/helloworld-java
            env:
            - name: TARGET
value: "Spring Boot Sample v1"
apiVersion: sources.eventing.knative.dev/v1alpha1
kind: GitHubSource
metadata:
  name: githubsourcesample
spec:
  eventTypes:
  - pull_request
 (...)
  sink:
    apiVersion: serving.knative.dev/v1alpha1
    kind: Service
name: github-message-dumper
knctl
gcloud beta run deploy --image gcr.io/$PROJECT/helloworld --cluster=standard-cluster-1