Is Kubernetes Serverless?

Is Kubernetes serverless? Kubernetes and serverless are very different terms of comparison, I agree. Serverless is more a philosophy while Kubernetes is a tool. Let me come back to the initial goals, just for a moment. We stated that we need to reduce dependency on the operating system and effort of maintenance — this is serverless.

So the question is, does Kubernetes achieve this goal? The short answer is yes, it does. Here’s the long answer:

The strict meaning of serverless is to deploy something without asking who is running this code and, even if Kubernetes abstraction hides the most complexity, there is something you have to know about the server part. You still have dependencies on the OS of every single container, for example. There’s the dependency from the specific version of Kubernetes running under the hood. This means that, theoretically, Kubernetes is not serverless.

Anyway, let’s see some serverless solutions.

Heroku relies on containers. You can also deploy a container to it. Most of the lambda functions have containers under the hood.

There’s a reason why we can consider a cloud version of Kubernetes to not be serverless: because it’s based on containers and depends on an operating system, while Heroku or lambda services that do the same are considered serverless.

That’s why I consider Kubernetes to be a serverless solution, even if the strict definition tells the opposite. The real world is not black or white and the level of abstraction and independence from the operating system, resources that a cloud version of Kubernetes gives to me, are enough.

I don’t want to be too precise. Regardless of labels (serverless or not), Kubernetes is a good way to go cloud easily, reduce sysadmin cost, infrastructure cost and reach, and improve quality. So don’t worry too much about labels and pick what will help you.