{"id":77,"date":"2025-06-29T03:16:18","date_gmt":"2025-06-29T03:16:18","guid":{"rendered":"https:\/\/aiopsschool.com\/blog\/?p=77"},"modified":"2025-06-29T03:16:19","modified_gmt":"2025-06-29T03:16:19","slug":"what-is-knative","status":"publish","type":"post","link":"https:\/\/aiopsschool.com\/blog\/what-is-knative\/","title":{"rendered":"What is Knative"},"content":{"rendered":"\n<p><strong>Knative<\/strong> is an open-source platform that extends Kubernetes to provide a <strong>serverless, event-driven, and autoscaling environment for running containerized applications<\/strong>. It was originally created by Google and is now governed by the CNCF (Cloud Native Computing Foundation).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Knative?<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Knative<\/strong> adds a \u201cserverless\u201d layer on top of Kubernetes.<\/li>\n\n\n\n<li>It enables you to run your containerized workloads <strong>only when they\u2019re needed<\/strong>, scaling them up or down (even to zero) automatically, in response to events or HTTP traffic.<\/li>\n\n\n\n<li>Designed to make deploying, running, and managing microservices and serverless functions <strong>easier, faster, and more resource-efficient<\/strong>.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Key Features<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Serverless Workloads on Kubernetes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatically scales apps up or down (even to zero) based on demand.<\/li>\n\n\n\n<li>No need to manage underlying servers or worry about idle resources.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Event-driven Applications<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easily connect to event sources (Kafka, CloudEvents, etc.) and trigger workloads in response.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Simplified Deployment<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simple, declarative YAML to deploy stateless services.<\/li>\n\n\n\n<li>Handles networking, routing, and traffic splitting for blue\/green and canary deployments.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Autoscaling<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Supports HTTP-based scaling and concurrency-based scaling.<\/li>\n\n\n\n<li>Great for unpredictable or bursty workloads.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>Integration with CI\/CD<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Works with existing Kubernetes tools, pipelines, and other cloud-native technologies.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Core Components<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Knative Serving<\/strong>\n<ul class=\"wp-block-list\">\n<li>Deploy and manage serverless, stateless services.<\/li>\n\n\n\n<li>Supports autoscaling, revision tracking, and traffic splitting.<\/li>\n\n\n\n<li>Each deployment creates a <strong>\u201cRevision\u201d<\/strong> (version) for easy rollback\/rollforward.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Knative Eventing<\/strong>\n<ul class=\"wp-block-list\">\n<li>Build event-driven apps by connecting various event sources to services.<\/li>\n\n\n\n<li>Standardizes event formats and delivery.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Knative in MLOps and ML Serving<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Model Inference:<\/strong> Run ML model servers (like KFServing\/KServe) that scale to zero when idle and auto-scale under load.<\/li>\n\n\n\n<li><strong>On-demand workloads:<\/strong> Useful for data preprocessing, batch jobs, or ad-hoc inference.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example: Deploying a Knative Service<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: serving.knative.dev\/v1\nkind: Service\nmetadata:\n  name: helloworld\nspec:\n  template:\n    spec:\n      containers:\n        - image: gcr.io\/knative-samples\/helloworld-go\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Deploy with:<\/strong> <code>kubectl apply -f service.yaml<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>When to Use Knative?<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You want to <strong>minimize cloud costs<\/strong> by running workloads only when needed.<\/li>\n\n\n\n<li>You need <strong>auto-scaling<\/strong> for unpredictable, spiky, or infrequent workloads.<\/li>\n\n\n\n<li>You want to build <strong>event-driven architectures<\/strong> on Kubernetes.<\/li>\n\n\n\n<li>You\u2019re building microservices that benefit from easy versioning and traffic management.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Knative vs. Other Tools<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Knative<\/th><th>K8s Deployments<\/th><th>AWS Lambda \/ GCP Cloud Functions<\/th><\/tr><\/thead><tbody><tr><td>Platform<\/td><td>Kubernetes<\/td><td>Kubernetes<\/td><td>Vendor Cloud Only<\/td><\/tr><tr><td>Scale to Zero<\/td><td>Yes<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Event-Driven<\/td><td>Yes (via Eventing)<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Traffic Split<\/td><td>Yes<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Language Support<\/td><td>Any (containerized)<\/td><td>Any<\/td><td>Limited<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h2>\n\n\n\n<p><strong>Knative<\/strong> brings the benefits of serverless\u2014autoscaling, event-driven execution, simple deployment\u2014to any Kubernetes cluster, making it easier to run cost-efficient, scalable, and production-grade microservices or ML inference endpoints.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Knative is an open-source platform that extends Kubernetes to provide a serverless, event-driven, and autoscaling environment for running containerized applications. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":1,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}