Live data from Hacker News

Knative – Kubernetes-based platform to manage modern serverless workloads

cloud.google.com

131–140 of 168 posts

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#131
post #123
post #48

Earlier quoted context omitted.

Have you ever used Kubernetes? The abstraction it focuses on is running container images; building them and getting them to a registry is a whole separate abstraction.

This is a great answer. Kubernetes is missing (or said another way, OpenShift has...) buildconfig and imagestream primitives to make building containers a natural extension of your Kubernetes deployments/daemonsets/whatever. OpenShift has done a really good job of being there, wherever Kubernetes is lagging behind. They may not provide the new canonical implementation of the solution to the forseen problem, but they…

Thanks for that - we definitely think there are many great ideas floating around in the Kube ecosystem, and projects like knative bring together a critical mass of perspectives and people to take “good ideas” and make them “things we all can depend on”.

knative is a mashup of good ideas and patterns from app engine, openshift, cloud foundry, FaaS, and public cloud providers. I think it will fill the missing space between containerized apps and true FaaS on top of Kube, while still making it easy to break the abstraction glass as necessary.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#132

Can I run functions written on any platform on Knative? Java? .net core? Js? What about startup times? How do they compare to other solutions?

> Can I run functions written on any platform on Knative? Java? .net core? Js? Anything that meets the Container Runtime Contract[0] should work. > What about startup times? How do they compare to other solutions? Startup times need a lot more work. Knative has a number of moving pieces which are contributing delay to startup time and they're being discussed or attacked by various groups. Some of this work will proba…

Startup time is the hardest (and most valuable) piece for everyone to work together on. By improving startup time of Kube containers, we can benefit (and draw from) a lot of people who are using Kube today, not just knative. This is a great example of trying to find an “everyone wins” scenario in open source and succeeding.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#133
post #82

Earlier quoted context omitted.

Is this something like what you're looking for? https://github.com/knative/serving/blob/master/docs/spec/ove... Or a little higher-level: https://docs.google.com/presentation/d/1CbwVC7W2JaSxRyltU8CS... There are a lot of technical docs in the individual repositories. You can get started, for example, with the serving docs under: https://github.com/knative/serving/tree/master/docs Same for the other repos, like build…

Not really, I'm afraid. Resource descriptions don't constitute a theory of operations, and the higher-level document you linked to is not public. By "theory of operations," I mean a design document, often but not always created before a line of code is written, that describes in plain English what is to be built (or, what was built). It often discusses things like: * What problems are being solved? * What attempts ha…

Have you taken a look at the docs repo? https://github.com/knative/docs/blob/master/README.md

We have the high-level overview and deeper dive into the details for each of the components, install instructions and samples.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#134
post #109

Earlier quoted context omitted.

I am giving you the higher level view on what I think it does ... read the docs! or even better the source code it is open. Explaining to you how the car works can be as far as explaining how physics work, because you need understand combustion, gravity etc. EDIT: and that will exceed 20 sentences by a few very heavy books.

According to the docs, the high level overview is misleading. You don't have to explain physics to explain how a car works. You only have to explain it in terms of something your audience is familiar with. Magnetization would be hard to explain to someone without physics, because there's no other parallel to quantum mechanics for the average person. But a car is based on general principles which most of us understand…

One of the items that's not present at the moment (and dewitt can probably provide additional color) is the top-level developer shell which puts the pieces together with a minimal amount of client-side work. If you can see Oren's GCP Next talk (https://cloud.withgoogle.com/next18/sf/sessions/session/2204... -- which doesn't show build or events yet), you can see a deployment using `gcloud serverless` to both containers on GCF and a Knative cluster, which differ only in a single flag to gcloud to tell it which endpoint to use.

The short summary if you had a nice client shell would be:

1) Run a command to deploy. That command:

a) determines what build templates are available on your cluster and what language/tools you're using, and finds a match between the two.

b) Creates a YAML definition of your application on the Knative cluster(and stages your source if needed).

2) On the server side:

a) The build component will (optionally) trigger to take staged source and convert it to a container.

b) The serving component will create Istio routes and various pieces to schedule your app into a k8s Deployment.

   i) This Deployment will scale to zero if there's no activity, and scale back up if needed.

   ii) Scale-to-zero is accomplished via a (shared) "actuator" which stalls the incoming HTTP request until a Pod is live.

 c) Additionally, the serving components loads various observability tools like Prometheus and ELK (by default, the no-mon or lite installs skip this) so that you can see what's happening even as your pods appear and disappear.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#135

Joining in, Markus from IBM and OpenWhisk. Been involved with knative for quite some time now as well. Happy to answer any questions that might arise as well. Answers might be biased and opinions are my own. See IBM's statement: https://www.ibm.com/blogs/cloud-computing/2018/07/24/ibm-clo...

Can we see a design document/theory of operations, please? It’s difficult to evaluate this effort without understanding exactly what it is - namely, the constituent components, their respective functions, how they work and relate to one another, etc.

The docs repo gives a high level overview and a deeper dive into each of the components with samples:

https://github.com/knative/docs/blob/master/README.md

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#136
post #80

Earlier quoted context omitted.

It isn't limited to functions. Knative can run containerees, or with a build system take full app code and deploy it as a container.

so it can be anything really ... hmm

I think Knative (and the scale to zero in particular) are best suited for request/response or event-delivery workloads. So you wouldn't want to run (for example) memcache or mysql under knative. FaaS and (HTTP application) PaaS are both good matches.

I think it's an open question whether a PaaS like Google Dataflow is a good match or not. It will certainly require more planning, but I think it's doable.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#138

Earlier quoted context omitted.

Not really, I'm afraid. Resource descriptions don't constitute a theory of operations, and the higher-level document you linked to is not public. By "theory of operations," I mean a design document, often but not always created before a line of code is written, that describes in plain English what is to be built (or, what was built). It often discusses things like: * What problems are being solved? * What attempts ha…

Have you taken a look at the docs repo? https://github.com/knative/docs/blob/master/README.md We have the high-level overview and deeper dive into the details for each of the components, install instructions and samples.

Yes, but they don't fit the description I discussed above. Or at least they're not organized in such a fashion.

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#139
post #10

I kinda have a hard time understanding what it is ... is it kinda a 'glue' layer between Kubernetes and istio ? Can somebody give us a 2 sentences explanation? please and thank you

Based on the linked GitHub readme, it seems that this allows you to deploy autoscaling apps ready for public consumption without having to worry about defining load balancers, ingress routes, etc. There's a lot of documentation and it's difficult (for me) to completely grok.

GitHub readme: https://github.com/knative/docs/blob/master/install/getting-...

Example Ruby app: https://github.com/knative/docs/blob/master/serving/samples/...

While I can see how this greatly simplifies deploying an app onto a Kubernetes cluster, I'm failing to see how this helps for serverless workloads

Re: Knative – Kubernetes-based platform to manage modern serverless workloads

#140
post #109

Earlier quoted context omitted.

I am giving you the higher level view on what I think it does ... read the docs! or even better the source code it is open. Explaining to you how the car works can be as far as explaining how physics work, because you need understand combustion, gravity etc. EDIT: and that will exceed 20 sentences by a few very heavy books.

According to the docs, the high level overview is misleading. You don't have to explain physics to explain how a car works. You only have to explain it in terms of something your audience is familiar with. Magnetization would be hard to explain to someone without physics, because there's no other parallel to quantum mechanics for the average person. But a car is based on general principles which most of us understand…

> ...But a car is based on general principles which most of us understand... (etc)

This is bar none the best explanation I have ever read of how a car works, without hand waving, to clarify for non-believers in car technology. I want to reward you, but I am kind of an outsider who honestly just strives to use Kubernetes, unsuccessfully, and I haven't got it off the ground at my organization yet (and I may never...)

So let me do my best, as an outsider who you must understand is absolutely hand-waving based on a quick read-over of the high-level documentation, and an understanding of how these systems go wrong; but I have no honest understanding of this particular stack (but then again, I've seen a lot of what some of the contributors are doing, so perhaps your grain of salt need not be too big... but I digress, in under 20 sentences...)

Serving Scale to zero, request-driven compute model:

You're aiming to build out your environment inside of a small footprint. If all of your customers go away, and stay gone for a day, you'd really like for your stack to approximately stop the cash bonfire altogether. This is a goal of the stack, too.

Build Cloud-native source to container orchestration

So your footprint is a program, and you programmed it in a language... great, an event... to be treated like other events, like a new customer that visits your website, or a new commit from one of your devs... whatever build is necessary for your stack to come into being, it's handled inside of this stack. Not to spoil it, but: events like this are the key driver for the entire system, which the system architecture actually reflects in a way...

Events Universal subscription, delivery and management of events

A minimal gateway serves as router that intercepts customers, and serves as infrastructure stander-upper, standing up the infrastructure on-demand while the greater parts of your stack are basically disposable and automatically self-destructive, so that every time a new customer comes along, the request actually starts the whole response stack anew. Then, upon finding no further traffic to answer, the newly provisioned stack rapidly disposes of itself to save on the cost.

The response stack tears itself down entirely on the way after the response is served. Unless there's another customer, if the capacity remains un-utilized for long enough to leave a mark... it's gone. But obviously this goes both ways. We don't want anyone to keep waiting in periods of increased load, if ever there's no capacity available, we want to increase the capacity as demand is spiking, in response to the demand to keep it satisfied. Again, this is baked into the platform.

Serverless add-on on GKE

* the fine print, you must at least have GKE or another Kubernetes cluster or provider at equivalent service levels to enjoy the benefits described above. This runs on GKE, or to be more precise, Kubernetes. That infrastructure stander-upper actually lives in the footprint of a GKE cluster. If you've paid for a cluster before GKE, don't worry, what I just said is still potentially much smaller and cheaper than you think. (GKE can scale to about $5/mo baseline footprint if you are small-time like me.) If you know how resource scheduling on Kubernetes works and you know how Autoscaling of Kubernetes cluster nodes works, you're about 90% of the way there toward knowing how this scaling situation works too.

There is a function gateway, that minimal gateway that I spoke of under "Events", and it is a persistent process that can't be stowed away for cheaper when it is not answering requests. But it drives the whole cluster. It spins up extra demand when events result in requests on topics that spawn Pods to respond, and Kubernetes will react to Pending pods with new Nodes to allow extra capacity to schedule those pods. tl;dr You need not keep extra capacity around when it's not actually needed. Don't even worry about it. The cluster will autoscale in response to rising and falling demand, and the bill will definitely come at the end of the month.

---

I've been trying to wrap my head around the whole Serverless Function thing for a couple of weeks now, as a Rails dev who hasn't had very much exposure to it and a Kubernetes enthusiast, well I think I get it now. (No one serverless stack is going to win, but obviously there will be a winner. Scaling to zero is the big win here. It's not the first platform to purport to scale in response to events, and even scaling down to zero, but not many have done this from what I can tell.)

Riff is one that advertised this "scale to zero" capability in their project before, and they are apparently involved with this project too, so that's neat. But if it's a car, back to where you started... and the commits from your developers are the feet on the pedals, ...oh hell we don't really need another car analogy do we? I seriously can't write anymore of this kind of garbage now, at least until I get my keyboard on the terminal for a while and try the thing out.

Supported on Minikube. I can tell you I tried Riff out this weekend (Riff team is represented here in this thread, they are apparently deeply involved in Knative), and I went through the experience of adding support for a new language runtime for Riff, and it was a lot like "not really having to do anything" other than put my feet on the pedals and keep control of the wheel, in terms of how the stack let me do what I know about, and getting out of my way for the most part.

I think I'll learn how to use gRPC now. I think I get the idea of what a "sidecar" container is really meant to be used for, now. I think I should stop writing though, and try compiling the source and see how this new runtime environment on Kubernetes behaves. I hope it's better than Riff (because Riff was impressive from the demo to the trial, but I don't think the Riff devs will be working and focused on this instead, unless it's actually going to be even better than that. They have no lack of vision in this space, in my humble opinion.)

Post reply on HN