This repo contains slides and resources for the Kubernetes endpoint session at ParslFest/FuncXFaire 2021.
The notebook KubernetesEndpoint.ipynb contains the slides along with some simple cells for exercising the deployed endpoint.
The endpoint is packaged as a Helm Chart with several useful options that
can be set with a values.yaml
file.
The first time you deploy an endpoint to your cluster, you will need to install your funcX tokens as a Kubernetes Secret.
If you've used the funcX client, these will already be available
in your home directory's .funcx/credentials
folder. If not, they can easily
be created with:
pip install funcx
python -c "from funcx.sdk.client import FuncXClient; FuncXClient()"
It will prompt you with an authentication URL to visit and ask you to paste the resulting token.
Now that you have a valid funcX token, cd to your ~/.funcx/credentials
directory and install the keys file as a kubernetes secret.
kubectl create secret generic funcx-sdk-tokens --from-file=funcx_sdk_tokens.json
Assumes you have a Kubernetes Cluster and the helm CLI available.
- Add the funcX helm chart repo
helm repo add funcx http://funcx.org/funcx-helm-charts/
- Refresh the locally cached charts
helm repo update
- Install the helm chart
helm install -f values.yaml funcx funcx/funcx_endpoint