Learning Library

← Back to Library

Knative Build, Serve, and Event Explained

Key Points

  • K Native, an open‑source project co‑created by IBM, Google and other industry leaders, adds serverless capabilities and native tooling to Kubernetes.
  • It is built around three “primitives” – **Build**, **Serve**, and **Event** – which together enable developers to run serverless workloads on a Kubernetes cluster.
  • The **Build** primitive streamlines the traditionally manual process of pulling source code, containerizing it, and pushing the image to a registry by handling the entire pipeline directly on the cluster, even supporting templates like Cloud Foundry buildpacks.
  • By abstracting these steps, K Native lets developers focus on code rather than the complex YAML manifests and CI/CD tooling normally required for Kubernetes deployments.

Full Transcript

# Knative Build, Serve, and Event Explained **Source:** [https://www.youtube.com/watch?v=69OfdJ5BIzs](https://www.youtube.com/watch?v=69OfdJ5BIzs) **Duration:** 00:07:58 ## Summary - K Native, an open‑source project co‑created by IBM, Google and other industry leaders, adds serverless capabilities and native tooling to Kubernetes. - It is built around three “primitives” – **Build**, **Serve**, and **Event** – which together enable developers to run serverless workloads on a Kubernetes cluster. - The **Build** primitive streamlines the traditionally manual process of pulling source code, containerizing it, and pushing the image to a registry by handling the entire pipeline directly on the cluster, even supporting templates like Cloud Foundry buildpacks. - By abstracting these steps, K Native lets developers focus on code rather than the complex YAML manifests and CI/CD tooling normally required for Kubernetes deployments. ## Sections - [00:00:00](https://www.youtube.com/watch?v=69OfdJ5BIzs&t=0s) **Knative Overview: Build, Serve, Event** - Developer advocate explains Knative's three core primitives—Build, Serve, and Event—that enable serverless workloads and native tooling on top of Kubernetes. ## Full Transcript
0:00hi everyone my name is Sai Benin and I'm 0:02a developer advocate with IBM today I 0:05want to talk about K native one of the 0:06fastest growing open source projects in 0:08the cloud native landscape today 0:10k native was recently announced and was 0:12developed by engineers from IBM Google 0:15and a number of other industry leaders 0:17essentially K native is a platform 0:20installed on top of kubernetes and 0:22essentially brings the capabilities of 0:25server lists and running service 0:27workloads to kubernetes in addition it 0:29provides a number of utilities that make 0:32working with your cloud native apps on 0:33kubernetes feel truly native I'd say 0:37there's three major components that make 0:39up Kay native on top of kubernetes so 0:43the first is going to be build next 0:47we've got serve and finally we have 0:53event these three components are 0:58actually called primitives and the 1:00reason is because they are the building 1:02blocks that make up Kay native and 1:04essentially are what allow it to run 1:06serverless workloads within kubernetes 1:08but in addition also provide endpoints 1:11and tools to make working with Kay 1:13native feel more natural and easy so 1:17let's get started with build I like to 1:20start with an example so what does every 1:22developer need to do when pushing their 1:25application to kubernetes well first 1:28they need to start with code right so 1:31every developer has code you can imagine 1:33it's probably hosted up on github so 1:36we've got that and and the next thing we 1:38want to do is take that code and turn it 1:40into a container because the first step 1:42is code the second step is always going 1:44to be turning it into that container 1:45something that kubernetes and docker or 1:47whatever container technology you might 1:49be using can understand so to do that it 1:53might be something really simple like a 1:55docker build or depending on how complex 1:58your build is it could be a set of steps 2:00to end up with that last that final 2:03container image once that image is 2:06developed and by the way to actually 2:08make that process happen you'll need to 2:10pull the code down to a local machine or 2:12you know have 2:13something like Travis or Jenkins make 2:15that container build for you right so 2:17once that's created you'll want to push 2:19that to a cloud registry something like 2:24docker hub or maybe a private image 2:26registry but essentially once it's up 2:29there kubernetes is now able to actually 2:31find it and deploy it and to do that 2:33you'll probably want to create some 2:36much-loved manifesto files and depending 2:39on how complex your deploy is you might 2:42have multiple KML files to make that 2:44deployment happen you can imagine that 2:47for a developer who is iteratively 2:48developing on top of kubernetes this is 2:51a lot of steps and it can be quite 2:53tedious with Kay native we can bring 2:56this entire process on to your 3:01kubernetes cluster so everything from 3:03source code management complex or custom 3:09builds or even if you wanted to there's 3:13a number of templates out there so for 3:15example if you like Cloud Foundry build 3:16packs there's a template for that to 3:18build your application so with Kay need 3:21a build you can do all of that within 3:23your cluster itself it makes it a lot 3:26easier for developers doing kind of 3:28iterative development and especially 3:31because this all these steps can be 3:32simplified into just a single manifest 3:34deploy you know it just becomes faster 3:37and becomes more agile to develop 3:39applications so we've talked about build 3:42so the next thing I want to talk about 3:44is serve serve has a very important role 3:48here and I think it's one of the more 3:49exciting parts of Kay native it actually 3:51comes with sto components kind of built 3:54in and if you're not familiar with sto 3:57check the link in the description below 3:58for more information but to kind of 4:01summarize it still comes with a number 4:03of capabilities things like traffic 4:05management intelligent routing automatic 4:08scaling and as well as scale to zero 4:11which is a pretty cool concept but 4:13essentially with several applications 4:15you want to be able to scale up to say 4:17maybe a thousand pods and then bring it 4:19all the way back down to zero if no one 4:21is accessing that service so let's take 4:24a look at what a sample 4:27serve the service rather that's managed 4:30by K native Serb would look like so at 4:33the top we'll start with a service and 4:37this can be you know your traditional 4:39kind of micro service or it can be kind 4:42of a function as well so that service is 4:45pointing and managing two different 4:47things it's going to be one of route to 4:51a config there's one really cool thing 4:55about Canada server that I haven't 4:57mentioned yet and it's the fact that 4:58every time you do a push it'll actually 5:01keep that revision stored so let's say 5:04we've done a couple pushes to this 5:06service so we've got revision 1 as well 5:09as revision 2 where revision 2 is the 5:12newer version of the app and config is 5:15actually going to manage both of those 5:17the route essentially is managing all 5:20the traffic and it routes them to one or 5:23actually more of those revisions 5:25so using sto traffic management 5:28capabilities we could say let's say 10% 5:30of all traffic gets routed to revision 2 5:33and 90% stays on revision 1 that way we 5:38can start planning to do a staged 5:39rollout or even do some a B testing 5:42so again K need have served just to kind 5:45of summarize provides snapshots it gives 5:52us intelligent routing as well as 5:57scaling all really cool features and I 6:03think build and serve together are going 6:05to be solving a lot of problems that 6:07people might be having when doing CI CD 6:10and doing micro service deployment to 6:12kubernetes the last thing I want to talk 6:15about is eventing this is one of those 6:17things that's still a work in progress 6:19in K native you know it's one of those 6:20projects that's been released recently 6:22you know at the time that we're creating 6:23this video it's still a work in progress 6:25but there are a number of capabilities 6:27that are available so with the venting 6:29it's kind of like an integral part of 6:32any serverless platform you need the 6:34ability to create triggers some sort of 6:36event that gets responded to by the 6:38platform itself let's say for example 6:40that 6:41you have a delivery rerouting algorithm 6:44that anytime inclement weather is 6:47detected you want to trigger that 6:48algorithm at that serverless action 6:50that's something that eventing would 6:52allow you to set up is triggers another 6:58thing you can do with eventing it's a 7:00different use case but you can kind of 7:02hook it into your CI CD pipeline let's 7:04say once you have this whole flow 7:05created you want to kick that off 7:07automatically anytime there's a new push 7:09to master or maybe anytime there's a new 7:11push to master you want to say 10% of 7:13traffic gets pushed that version of the 7:15app so with the venting you can make 7:18that reality 7:20so creating pipelines with the venting 7:24is also an option and as this feature 7:26gets kind of more developed becomes more 7:29robust we'll see a number of kind of 7:31options and opportunities for taking 7:33advantage of K native eventing so these 7:37three components together are what make 7:39a native so powerful K native is 7:42definitely shaping up to be one of the 7:43biggest players in the cloud native and 7:45kubernetes landscape I hope you enjoyed 7:48my explanation of K native today 7:50definitely stay tuned for more light 7:51boarding sessions in the future and 7:53again if you want to learn more check 7:55out the IBM cloud blog