Project Icon

faas-netes

Kubernetes 上的开源无服务器函数平台

faas-netes 是 OpenFaaS 的 Kubernetes 提供程序,为容器编排平台带来无服务器体验。它集成 Kubernetes 原生功能,提供 REST API、CLI 和 UI 界面,支持自动扩缩容和异步调用。作为开源项目,faas-netes 拥有活跃社区,适用于构建云原生微服务和函数,同时提供商业支持选项。

faas-netes Community Edition (CE)

Serverless Functions For Kubernetes with OpenFaaS

Build Status Go Report Card OpenFaaS

Introduction

faas-netes is an OpenFaaS provider which enables Kubernetes for OpenFaaS. It's part of a larger stack that brings a cloud-agnostic serverless experience to Kubernetes. This repository hosts the Community Edition (CE) of the provider, OpenFaaS Standard and OpenFaaS for Enterprises use separate codebases and licensing.

The existing REST API, CLI and UI are fully compatible. With OpenFaaS Standard/Enterprise, you have an optional operator mode so that you can manage functions with kubectl and a CustomResource.

You can deploy OpenFaaS to any Kubernetes service - whether managed or local, including to OpenShift. You will find any specific instructions and additional links in the documentation.

OpenFaaS (Functions as a Service) is a framework for building serverless functions with Docker and Kubernetes which has first class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.

OpenFaaS workflow

Pictured: OpenFaaS conceptual architecture

Highlights

  • Free for personal & non-commercial use. Commercial use limited to 60 days, then you must buy a license.
  • Platform for deploying serverless-style workloads - microservices and functions
  • Native Kubernetes integrations (API and ecosystem)
  • Built-in UI portal
  • Scale to and from zero
  • Built-in queuing and asynchronous invocations
  • Custom routes and domain support
  • Commercial support available

Additional & ecosystem:

  • A range of event-connectors and cron-support
  • helm chart and CLI installer
  • Operator available to use Custom Resource Definitions (CRDs) (See also: OpenFaaS Pro)
  • IDp integration with OIDC and commercial add-on

Community:

  • Over 30k GitHub stars
  • Independent open-source project with over 300 contributors, with commercial option available

Commercial options:

  • Support from full-time team
  • Commercial add-ons and integrations with events like Kafka, Postgres, AWS SQS and Cron
  • Multiple namespace support
  • gVisor support and runtimeClass for isolation
  • Affinity and advanced scheduling / security constraints
  • Airgap
  • RBAC/IAM & SSO

Find out more: OpenFaaS Standard and For Enterprises

Get started

The PLONK Stack

OpenFaaS can be used as complete stack for Cloud Native application development called PLONK. The PLONK Stack includes: Prometheus, Linux/Linkerd, OpenFaaS, NATS/Nginx and Kubernetes.

Read more: Introducing PLONK.

Technical and operational information

The rest of this document is dedicated to technical and operational information for the controller.

Operating modes - "controller" or operator

There are two modes available for faas-netes, the operator mode is supported for production. The controller mode is legacy and will be removed in a future release. We are unable to support new customers who use the controller mode, and it may not have feature parity with the operator mode.

The controller mode is the only option for OpenFaaS Community Edition (CE).

See also: How and why you should upgrade to the Function Custom Resource Definition (CRD)

Configuration of this component

faas-netes can be configured with environment variables, but for a full set of options see the helm chart.

OptionUsage
httpProbeBoolean - use http probe type for function readiness and liveness. Default: true
write_timeoutHTTP timeout for writing a response body from your function (in seconds). Default: 60s
read_timeoutHTTP timeout for reading the payload from the client caller (in seconds). Default: 60s
image_pull_policyImage pull policy for deployed functions (Always, IfNotPresent, Never). Default: Always
gateway.resourcesCPU/Memory resources requests/limits (memory: 120Mi, cpu: 50m)
faasnetes.resourcesCPU/Memory resources requests/limits (memory: 120Mi, cpu: 50m)
operator.resourcesCPU/Memory resources requests/limits (memory: 120Mi, cpu: 50m)
queueWorker.resourcesCPU/Memory resources requests/limits (memory: 120Mi, cpu: 50m)
prometheus.resourcesCPU/Memory resources requests/limits (memory: 512Mi)
alertmanager.resourcesCPU/Memory resources requests/limits (memory: 25Mi)
nats.resourcesCPU/Memory resources requests/limits (memory: 120Mi)
basicAuthPlugin.resourcesCPU/Memory resources requests/limits (memory: 50Mi, cpu: 20m)

Readiness checking

The readiness checking for functions assumes you are using our function watchdog which writes a .lock file in the default "tempdir" within a container. To see this in action you can delete the .lock file in a running Pod with kubectl exec and the function will be re-scheduled.

Namespaces

By default all OpenFaaS functions and services are deployed to the openfaas and openfaas-fn namespaces. To alter the namespace use the helm chart.

Ingress

To configure ingress see the helm chart. By default NodePorts are used. These are listed in the deployment guide.

By default functions are exposed at http://gateway:8080/function/NAME.

You can also use the IngressOperator to set up custom domains and HTTP paths

Image pull policy

By default, deployed functions will use an imagePullPolicy of Always, which ensures functions using static image tags are refreshed during an update.

If this is not desired behavior, OpenFaaS Pro customers can set the image_pull_policy environment variable to an alternative. IfNotPresent is particularly useful when developing locally with minikube. In this case, you can set your local environment to use minikube's docker so faas-cli build builds directly into minikube's image store. faas-cli push is unnecessary in this workflow - use faas-cli build then faas-cli deploy.

Note: When set to Never, only local (or pulled) images will work. When set to IfNotPresent, function deployments may not be updated when using static image tags.

Kubernetes Versions

faas-netes maintainers strive to support as many Kubernetes versions as possible and it is currently compatible with Kubernetes 1.11 and higher. Instructions for OpenShift are also available in the documentation.

Contributing

You can quickly create a standard development environment using:

make start-kind

This will use KinD to create a single node cluster and install the latest version of OpenFaaS via the Helm chart.

Check the contributor guide in CONTRIBUTING.md for more details on the workflow, processes, and additional tips.

License

This project is licensed under the MIT License.

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

白日梦AI

白日梦AI提供专注于AI视频生成的多样化功能,包括文生视频、动态画面和形象生成等,帮助用户快速上手,创造专业级内容。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

讯飞绘镜

讯飞绘镜是一个支持从创意到完整视频创作的智能平台,用户可以快速生成视频素材并创作独特的音乐视频和故事。平台提供多样化的主题和精选作品,帮助用户探索创意灵感。

Project Cover

讯飞文书

讯飞文书依托讯飞星火大模型,为文书写作者提供从素材筹备到稿件撰写及审稿的全程支持。通过录音智记和以稿写稿等功能,满足事务性工作的高频需求,帮助撰稿人节省精力,提高效率,优化工作与生活。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号