Knative enables serverless workloads to run on Kubernetes clusters. It makes building and orchestrating containers with Kubernetes faster and easier.
Knative (pronounced Kay-NAY-tive) is an extension of the Kubernetes container orchestration platform. It provides tools and utilities that make building, deploying and managing containerized applications within Kubernetes a simpler and more "native-to-Kubernetes" experience (hence the name, "K" for "Kubernetes" + "native").
Like Kubernetes, Knative is open source software. Google initially developed it in collaboration with IBM®, Pivotal, Red Hat®, SAP and nearly 50 other companies. Today, the Cloud Native Computing Foundation (CNCF) hosts the Knative open source project.
Kubernetes automates and schedules the deployment, management and scaling of containers—lightweight, executable application components that combine source code with all the operating system (OS) libraries and dependencies required to run the code in any environment.
Containers allow application components to share the resources of a single instance of an OS, in much the same way that virtual machines (VMs) allow applications to share the resources of a single physical computer. Smaller and more resource-efficient than VMs and better suited to the incremental release cycles of Agile and DevOps development methodologies, containers have become the de facto compute units of modern cloud-native applications. Companies that use containers report other benefits, including improved app quality, greater levels of innovation and more:
As cloud-native development becomes more popular and containers proliferate an organization, Kubernetes’ container orchestration capabilities, which include scheduling, load balancing, health monitoring and more, make that proliferation a lot easier to manage. However, Kubernetes is a complex tool that requires developers to perform or template many repetitive tasks, such as pulling application source code from repositories, building and provisioning a container image around the code and configuring network connections outside of Kubernetes using different tools. Incorporating Kubernetes-managed containers into an automated continuous integration/continuous delivery (CI/DC) pipeline requires special tools and custom coding.
Knative eliminates this complexity with tools that automate these tasks from within Kubernetes. A developer can define the container's contents and configuration in a single YAML manifest file, and Knative does the rest, creating the container and performing the network programming to set up a route, ingress, load balancing and more. Knative also offers a command line interface, Knative CLI that allows developers to access Knative features without editing YAML files.
Serverless computing is a cloud-native execution model that makes applications easier to develop and more cost-effective. The serverless computing model
On its own, Kubernetes can't run serverless applications without specialized software that integrates Kubernetes with a specific cloud provider's serverless platform. Knative enables any container to run as a serverless workload on any Kubernetes cluster, whether the container is built around a serverless function or other application code (for example, microservices), by abstracting away the code and handling the network routing, event triggers and autoscaling.
Knative sits on Kubernetes and adds three main components or primatives: Build, Serving and Eventing.
.
The Knative Build component automates turning source code into a container. This process typically involves multiple steps, including:
Knative uses Kubernetes APIs and other tools for its Build process. A developer can create a single manifest (typically a YAML file) that specifies all the variables—location of the source code, required dependencies and more—and Knative uses the manifest to automate the container build.
The Serving component deploys and runs containers as scalable Knative services. Serving provides the following essential capabilities:
Knative Serving borrows intelligent service routing from Istio, another application in the Kubernetes ecosystem. An open source service mesh for Kubernetes, Istio also provides authentication for service requests, automatic traffic encryption for secure communication between services, detailed metrics about microservices and serverless function operations and other tools for developers and administrators to optimize infrastructure. For more details on how Knative uses Istio, read “Istio and Knative: Extending Kubernetes for a New Developer Experience."
The Eventing component of Knative enables different events to trigger their container-based services and functions. Knative queues and delivers those events to the appropriate containers, so there's no need to write scripts or implement middleware for the functionality. Knative also handles channels, which are queues of events that developers can choose from, and the bus, a messaging platform that delivers events to containers. It also enables developers to set up feeds, which connect an event to an action for their containers to perform.
Knative Event sources make it easier for developers to create connections to third-party event producers. Knative eventing automatically creates the connection to the event producer and routes the generated events. There's no need to figure out how to do it programmatically—Knative does all the work.
To recap, Knative supports several use cases for Kubernetes users who want to simplify containerized app development or take their use of containers to the next level.
Streamlining Kubernetes. By eliminating repetitive build and configuration tasks, Knative makes developers working with Kubernetes more productive. Any development team struggling to manage a growing number of Kubernetes clusters is an ideal candidate for Knative.
Accelerating the journey to serverless. Serverless environments can be daunting to set up and manage manually. Knative enables organizations to set up serverless workloads quickly. As far as the developers are concerned, they’re just building a container—it’s Knative that runs it as a serverless function behind the scenes.
Supporting Agile and DevOps lifecycles. By enabling developers to create new containers and container versions more quickly, Knative makes it easier to deploy containerized applications in small, fast, iterative steps as part of an Agile or DevOps workflow. Knative services integrate easily into automated CI/CD pipelines without requiring special software or custom programming.
Smoothing new feature rollouts. Rolling out new releases to customers can expose software issues that might affect business processes. Knative's configuration and routing let developers expose new container revisions to a subset of the user base. Then, they gradually increase that audience over time as they troubleshoot issues or quickly roll back to older versions if necessary.
Keeping developers focused on coding and innovation. DevOps might empower developers to administer their own environments. But at the end of the day, developers want to focus on building bug-free software and innovative new features, not on configuring message bus queues for event triggering or managing container scalability. Knative lets developers spend more time doing what they do best.
Understand how leading businesses are using container technology to drive innovation, scalability and efficiency. Download your copy now.
Discover how a hybrid cloud strategy can drive flexibility, security and growth for your business. Explore expert insights and real-world case studies that show why leading enterprises are making the switch.
Docker simplifies application deployment with lightweight, portable containers, ensuring consistency, scalability and efficiency across environments. Streamline your processes and boost performance with Docker today.
Ready to transform your business with advanced data solutions? Explore how IBM's cutting-edge technologies can help you harness the power of data, streamline operations and gain a competitive edge.
Explore how Kubernetes enables businesses to handle large-scale applications, improve resource efficiency and achieve faster software delivery cycles. Learn how adopting Kubernetes can optimize your IT infrastructure and boost operational efficiency.
Enhance your infrastructure’s availability, scalability and security by exploring IBM’s load balancing offerings. Take the next step toward seamless traffic management today.
Use a managed Kubernetes service that enables users to deploy, manage and scale containerized applications across a secure and flexible Kubernetes environment.
Accelerate containerized application development with IBM Cloud’s fully managed Red Hat OpenShift platform. Unlock the flexibility of Kubernetes with powerful integrations and support.
Streamline your digital transformation with IBM’s hybrid cloud solutions, built to optimize scalability, modernization and seamless integration across your IT infrastructure.