Knative

Kubernetes-based platform to build, deploy, and manage modern serverless workloads.

Essential base primitives for all

Knative, created originally by Google with contributions from over 50 different companies, delivers an essential set of components to build and run serverless applications on Kubernetes. Knative offers features like scale-to-zero, autoscaling, in-cluster builds, and eventing framework for cloud-native applications on Kubernetes. Whether on-premises, in the cloud, or in a third-party data center, Knative codifies the best practices shared by successful real-world Kubernetes-based frameworks. Most importantly, Knative enables developers to focus on writing code without the need to worry about the “boring but difficult” parts of building, deploying, and managing their application.

Developer-friendly software

Knative offers a set of reusable components that focuses on solving many mundane but difficult tasks such as workflows like building applications from source code to container images, routing and managing traffic during deployment, auto-scaling your workloads, or binding running services to the growing ecosystem of event sources. Knative recognizes container images as the deployment unit. Therefore, developers can use any language, framework, or idiom they’re familiar with.

Supports popular development patterns

Knative focuses on an idiomatic developer experience. It supports common development patterns such as GitOps, DockerOps, ManualOps, as well as tools and frameworks such as Django, Ruby on Rails, Spring, and many more.

Best of both worlds: Flexibility and control

Knative is designed to plug easily into existing build and CI/CD toolchains. By focusing on open-source-first technologies that run anywhere, on any cloud, on any infrastructure supported by Kubernetes, enterprises are free to move their workloads wherever they run best. This offers the flexibility and control customers need to adapt the system to their own unique requirements.

Run your serverless workloads on your own terms

Knative provides an open API and runtime environment that enables you to run your serverless workloads anywhere you choose: fully managed on Google Cloud, on Google Kubernetes Engine (GKE), or on your own Kubernetes cluster. Knative makes it easy to start with Cloud Run and later move to Cloud Run on GKE or start in your own kubernetes cluster and migrate to Cloud Run in the future. By using Knative as the underlying platform, you can move your workloads freely across platforms, while significantly reducing the switching costs.

Knative components

Build

  • Configurable and flexible approach to building source code into containers

  • Pluggable approach leveraging Dockerfiles or built templates

  • No cross-compiling or need for local build tools

  • Support for cached artifacts for faster builds

  • Allow your organization to utilize spare capacity for better resource usage

Serving

  • Higher level abstraction, easy to reason about the object model

  • Seamless autoscaling based on HTTP requests

  • Gradual rollouts for new revisions

  • Integrates networking and service mesh automatically

  • Pluggable: connect your own logging and monitoring platform

Eventing

  • Universal subscription, delivery, and management of events

  • Build loosely coupled, event-driven systems with high-level objects

  • Declarative binding between event producers and event consuming services

  • Scalable from just a few events to live streams

  • Custom event pipelines to connect with your own existing systems

Knative helps our developers focus on building the business logic rather than worrying about building low-level platform capabilities such as build, deploy, autoscaling, monitoring, and observability. For example, our T-Mobile store locator app developed in Java/Vert.x was easy to migrate to GCP using Knative. We did that in just a sprint as Knative provided lot of platform-level capabilities that our developers did not have to build.

— Ram Gopinathan, Principal Technology Architect, T-Mobile

Resources

Cloud Run docs

Deploy a container to Cloud Run

Cloud Run on GKE docs

Deploy a container to Cloud Run on GKE

Developer resources

Overview of Knative and its components

Community Resources

Google Cloud

Get started

Build, deploy, and manage serverless workloads with Knative

Follow the Cloud Run quickstart to get Knative up and running. For operators who want to provide a Knative environment, an installation guide is available on github.