Migrating from Kubernetes Deployment to Knative Serving

When I talk about Knative, I often get questions on how to migrate an app from Kubernetes Deployment (sometimes with Istio) to Knative and what are the differences between the two setups. First of all, everything you can do with a Knative Service, you can probably do with a pure Kubernetes + Istio setup and the right configuration. However, it’ll be much harder to get right. The whole point of Knative is to simplify and abstract away the details of Kubernetes and Istio for you. Read More →

Knative Serving 0.7

As you might have heard, Knative 0.7 was out last week. One of the notable changes in this release is that Knative Serving API progressed from v1alpha to v1beta. While you can still use the old v1alpha1 API, if you want to update to v1beta, you need to rewrite your Knative service definition files. The new API also allows named revisions, silent latest deploys and a better traffic splitting configuration. In this post, I want to outline some of these changes. Read More →

Cloud Run as an internal async worker

Cloud Pub/Sub + Cloud Run Introduction If you’ve heard of Cloud Run, you already know that it’s great for spinning public endpoints inside stateless containers to handle HTTP request/reply type of workloads. And the best part is that you only pay for the duration of the request! However, HTTP request/reply handling is not the only use-case for Cloud Run. Combined with Cloud Pub/Sub, Cloud Run is very well suited for internal async worker type use-cases because: Read More →

Knative + Buildpacks: Source code to container image without Dockerfile

I previously talked about Knative Build and how it enables you to go from source code to a container image in a repository. You can write your Build from scratch or you can rely on many of the BuildTemplates Knative already provides. For example, in my Knative Tutorial, I show how to install Kaniko BuildTemplate and use Kaniko to build container images. You normally need to write a Dockerfile, so Knative Build (or Kaniko to be more precise) knows how to build the container image. Read More →

Knative to Cloud Run

Cloud Run In my Hands on Knative series (part 1, part 2, part 3), I showed how to use Knative Serving, Eventing and Build on any Kubernetes cluster anywhere. This is great for portability but with that portability comes the overhead of creating and managing a Kubernetes cluster. Not to mention the complexity of Istio which is a dependency of Knative. Google Kubernetes Engine (GKE) helps with managing the Kubernetes cluster a little but you still need to worry about all the bells and whistles of a Kubernetes cluster. Read More →

Hands on Knative — Part 3

In Part 1, I talked about Knative Serving for rapid deployment and autoscaling of serverless containers. In Part 2, I talked about how to connect services in a loosely coupled way with Knative Eventing. In third and last part of the series, I want to talk about Knative Build and show a few examples from my Knative Tutorial. What is Knative Build? Knative Build basically allows you to go from source code to a container image in a registry. Read More →

Hands on Knative — Part 2

In my previous post, I talked about Knative Serving for rapid deployment and autoscaling of serverless containers. Knative Serving is great if you want your services to be synchronously triggered by HTTP calls. However, in the serverless microservices world, asynchronous triggers are more common and useful. That’s when Knative Eventing comes into play. In this second part of Hands on Knative series, I want to introduce Knative Eventing and show some examples from my Knative Tutorial on how to integrate it with various services. Read More →

Hands on Knative — Part 1

I’ve been looking into Knative recently. In this 3-part blog series, I want to explain my learnings and show some hands on examples from the Knative Tutorial that I published on GitHub. What is Knative anyway? Knative is a collection of open source building blocks for serverless containers running on Kubernetes. At this point, you might be wondering: “Kubernetes, serverless, what’s going on?” But, when you think about it, it makes sense. Read More →