A Kubernetes-Native way to run pulsar functions, connectors and composed function meshes.
curl -sSL https://github.com/streamnative/function-mesh/releases/download/v0.7.0/install.sh | bash
The above command installs all the CRDs, required service account configuration, and all function-mesh operator components. Before you start running a function-mesh example, verify if Function Mesh is installed correctly.
Note:
install.sh is suitable for trying Function Mesh out. If you want to use Function Mesh in production or other serious scenarios, Helm is the recommended deployment method.
This table outlines the supported Kubernetes versions. We have tested these versions in their respective branches. But note that other versions might work as well.
Function Mesh operator | Kubernetes 1.16 | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 | Kubernetes 1.20 | Kubernetes 1.21 | Kubernetes 1.22 |
---|---|---|---|---|---|---|---|
v0.7.0 |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
v0.6.0 |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
v0.5.0 |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
v0.4.0 |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
v0.3.0 |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Master |
✗ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
- install Git and download the repo
git clone https://github.com/streamnative/function-mesh.git
- install operator-sdk and use it to add CRD, controller or webhooks
operator-sdk create api --group compute --version v1alpha1 --kind Function --resource=true --controller=true
operator-sdk create webhook --group compute.functionmesh.io --version v1alpha1 --kind Function --defaulting --programmatic-validation
- make sure connected to a kubernetes cluster(gke, mini-kube etc.)
gcloud container clusters get-credentials cluster-1 --region $CLUSTER_REGION --project $PROJECT_ID
- compile the repo to generate related resources in the root dir of the repo.
make generate
- install the CRD into your k8s cluster.
make install
- start the controller locally. Only the controller itself is running in your local terminal, all the resources will be running inside the connected kubernetes cluster
make run
- submit a sample CRD to the cluster. You can also submit other CRDs under the
./config/samples
directorykubectl apply -f config/samples/compute_v1alpha1_function.yaml
- verify your submission with
kubectl
, and you will see the function pod is running$ kubectl get all NAME READY STATUS RESTARTS AGE pod/function-sample-0 1/1 Running 0 77s
- in order for function actually work, you need to have a pulsar cluster available for visiting. you can use the helm-chart to deploy one