serving icon indicating copy to clipboard operation
serving copied to clipboard

Make Knative Serving running on Edge (k0s/microshift/...)

Open aliok opened this issue 3 years ago • 10 comments

Describe the feature

I am curious to see what kind of issues / limitations we will have when we want to run Knative Serving on something like k0s or Microshift.

With leveraging mink and creating a single binary for Knative + Kube with k0s, we could achieve very minimal footprint.

aliok avatar Mar 10 '22 07:03 aliok

FYI, @csantanapr and I want to make this experiment done by a GSoC contributor this summer.

aliok avatar Mar 10 '22 07:03 aliok

Thanks for opening the issue @aliok 👍

A few other random thoughts

  • is what parts of knative we can turn off or remove that are not need it at edge worker node
  • worker node with control plane components vs worker edge node (ie containerd, kubelet, Knative user Pod( container+queueproxy))
  • replace queproxy sidecard with a single queue proxy agent (ebpf) on the node
  • benchmark with a baseline and automate testing measuring footprint with metrics

csantanapr avatar Mar 10 '22 11:03 csantanapr

Assumptions for edge device?

  • no HA need it, can wait for things to be recreated
  • max limit always 1, things can be queue eventually everything is process by the one use pod
  • slow connection between edge worker node and control plane node. How the slow connection affects connections. Where are the ingress and activator live?

csantanapr avatar Mar 10 '22 11:03 csantanapr

  • is what parts of knative we can turn off or remove that are not need it at edge worker node worker node with control plane components vs worker edge node (ie containerd, kubelet, Knative user Pod( container+queueproxy))

Big +1 on this one. This is the most interesting thing for me.

  • replace queproxy sidecard with a single queue proxy agent (ebpf) on the node

Sounds great but maybe optional.

  • benchmark with a baseline and automate testing measuring footprint with metrics

What would be the baseline? But, for sure I would be interested in seeing something like "on a RaspPi XYZ device, system was able to handle this and that"

Assumptions for edge device?

  • no HA need it, can wait for things to be recreated

+1

  • max limit always 1, things can be queue eventually everything is process by the one use pod

Queued where?

  • slow connection between edge worker node and control plane node. How the slow connection affects connections. Where are the ingress and activator live?

"Where are the ingress and activator live?" is a tough question :)

Well, I don't know many of the answers and I see this as a research project that we can guide a contributor.

aliok avatar Mar 10 '22 13:03 aliok

yes all my questions and comments, are for the summer students to look into it and research with us

csantanapr avatar Mar 10 '22 19:03 csantanapr

The intention was not to answer them today, but answering them together during the summer internship

csantanapr avatar Mar 10 '22 19:03 csantanapr

Hi all. I am Excel, and I im interested in contributing to this project for GSoC '22. I have joined the community, and have been looking into Knative too. I am thinking of attending the event that was posted on the community to get up to speed with Knative in general.

Is this alright? And are there any prerequisites I need to complete to increase my chances, or to write a good proposal? Thank you!

rahul3002 avatar Apr 02 '22 06:04 rahul3002

Hi Rahul One way to increase your chances is to include in your proposals Additional alternatives to investigate and provide more details on it. For example, what about using Talos is k8s native operating system? What about if the operating system also included knative capabilities? Would that make it more efficient footprint-wise?

csantanapr avatar Apr 02 '22 19:04 csantanapr

can I work on this issue?

rahul3002 avatar Apr 25 '22 04:04 rahul3002

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jul 25 '22 01:07 github-actions[bot]

/reopen

rahul3002 avatar Sep 18 '22 10:09 rahul3002

/remove-lifecycle stale.

rahul3002 avatar Sep 18 '22 10:09 rahul3002

Is this project lifecycle out of date for GSoC 2023? @csantanapr @aliok

cubxxw avatar Mar 20 '23 01:03 cubxxw

/reopen

This issue is listed for GSoC 2023 here: https://github.com/cncf/mentoring/blob/main/summerofcode/2023.md#porting-knative-serving-to-microshift

aliok avatar Mar 21 '23 07:03 aliok

@aliok: Reopened this issue.

In response to this:

/reopen

This issue is listed for GSoC 2023 here: https://github.com/cncf/mentoring/blob/main/summerofcode/2023.md#porting-knative-serving-to-microshift

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow[bot] avatar Mar 21 '23 07:03 knative-prow[bot]

Hi

I have experimented and installed Knative serving in K0s as part of the proposal for GSoC '23 . I am adding a reference here in case someone wants to run knative serving in k0s with minimal resource. Knative Serving in k0s

naveenrajm7 avatar Mar 24 '23 19:03 naveenrajm7

@naveenrajm7 This is an awesome investigation and example

I would love to have your write up as a blog post on our website knative.dev in time for KubeCon EU April 18th

Would you be willing to create a PR to add a blog post? https://github.com/knative/docs

I think further optimizations can be done, but what you have accomplished is a good investigation 🚀

csantanapr avatar Mar 25 '23 11:03 csantanapr

Hi @csantanapr

Great to hear this from you. Here is the PR for blog post https://github.com/knative/docs/pull/5514

Yes, In this work just resource reduction was done and no real optimization was performed. I would like to explore optimizing Knative for Edge as part of GSoC and would appreciate your pointers/guidance on my GSoC proposal

Thanks!

naveenrajm7 avatar Mar 27 '23 00:03 naveenrajm7

/triage accepted

ReToCode avatar Mar 27 '23 11:03 ReToCode

Hi @aliok This didn't make it into GSoC'23. Would it be possible for this to go in LFX Mentorship Term 02 - 2023 June - August .

naveenrajm7 avatar May 05 '23 06:05 naveenrajm7

We are working towards adding ideas to LFX Mentorship as well.

5 May 2023 Cum 09:10 tarihinde Naveenraj M @.***> şunu yazdı:

Hi @aliok https://github.com/aliok This didn't make it into GSoC'23. Would it be possible for this to go in LFX Mentorship Term 02 - 2023 June

— Reply to this email directly, view it on GitHub https://github.com/knative/serving/issues/12718#issuecomment-1535759835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC37HCCI5AVMHPESM33NALXESKV3ANCNFSM5QLXJS7Q . You are receiving this because you were mentioned.Message ID: @.***>

aliok avatar May 05 '23 06:05 aliok

@naveenrajm7 I created https://github.com/cncf/mentoring/pull/955

aliok avatar May 05 '23 10:05 aliok

Hii @aliok, This proposal looks interesting. I would to like to apply for this in LFX mentorship. It will be really helpful if you can tell me the prerequisites for this.

hackeramitkumar avatar May 05 '23 18:05 hackeramitkumar

Hi @ReToCode @skonto,

I wanted to express my interest in this mentorship program and inform you that I have already applied through the LFX console. I have a solid background in computer science and have gained experience in developing event-triggered functions using Cloud Run, Cloud Functions, and Lambda.

I am particularly excited to learn more about implementing GoLang and practicing Knative on minimal Kubernetes resources. To kickstart my journey, I plan to follow the document titled "Knative Serving in k0s" available at Knative Serving in k0s. Additionally, I am eager to explore the possibilities of utilizing Knative on edge environments.

Thank you for considering my application. I look forward to the opportunity to learn and contribute.

tantan31418 avatar May 22 '23 14:05 tantan31418

@aliok is there anyone still working on this issue

sagnik3788 avatar Jan 02 '24 18:01 sagnik3788

@naveenrajm7 did finish the work on this and did a write-up here. @naveenrajm7 do you still plan to write a blog-post about this?

ReToCode avatar Jan 03 '24 07:01 ReToCode

Hi I did write a blog post on this project which featured in the CNCF LFX graduation post , the original post is here. As you pointed out the technical report is in my github repo

naveenrajm7 avatar Jan 04 '24 02:01 naveenrajm7

Ok, I meant on the Knative Blog as well :) But the existing one should be sufficient, so I'm going to close this issue.

ReToCode avatar Jan 04 '24 06:01 ReToCode