Skip to content

Knative Functions overview

Knative Functions provides a simple programming model for using functions on Knative, without requiring in-depth knowledge of Knative, Kubernetes, containers, or dockerfiles.

Knative Functions enables you to easily create, build, and deploy stateless, event-driven functions as Knative Services by using the func CLI.

Functions can be packaged as Open Container Initiative (OCI) images without writing a Dockerfile. A local container build does not publish an image to a registry. Deployment builds and pushes an image so the cluster can pull it. Supported host builders can also run functions locally without a container.

You can create functions and manage function workflows by using the func CLI, or by using the kn func plugin for the Knative CLI.

Function templates

Knative Functions provides templates that can be used to create basic functions, by initiating a function project boilerplate when you run a create command.

Templates allow you to choose the language and invocation format for your function. The following templates are available with both CloudEvent and HTTP invocation formats:

Language packs

Functions can be written in any language supported by the available language packs.

Getting started with functions

Follow Get started with Functions to create, change, and test a Go function locally. This is the same Functions track linked from Get Started. Cluster deployment is optional and links to the shared learning-cluster setup.

For an existing project, use the how-to guides in this section.

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.