一 快速部署

Kubernetes上helm部署就挺快的。
需准备:

  1. 一个k8s集群
  2. helm装好

    命名空间

    给openfaas配两个命名空间:
    1. kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
    一个用于部署openfaas,一个用于部署function。

添加helm repo

  1. helm repo add openfaas https://openfaas.github.io/faas-netes/

安装chart

  1. helm repo update \
  2. && helm upgrade openfaas --install openfaas/openfaas \
  3. --namespace openfaas \
  4. --set functionNamespace=openfaas-fn \
  5. --set generateBasicAuth=true

image.png