The ToolHive Kubernetes Operator manages MCP (Model Context Protocol) servers in Kubernetes clusters. It allows you to define MCP servers as Kubernetes resources and automates their deployment and management.
- Helm installed
- Kind installed
- Optional: Task to run automated steps with a cloned copy of the ToolHive repository
(
git clone https://github.com/stacklok/toolhive)
To setup a kind cluster and/or deploy the Operator, we have created a Task so that you can do this with one command. You will need to clone this repository to run the command.
Run:
task kind-with-toolhive-operatorThis will create the kind cluster, install an nginx ingress controller and then install the latest built ToolHive Operator image.
Run:
# If you want to install the latest built operator image from Github (recommended)
task operator-deploy-latest
# If you want to built the operator image locally and deploy it (only recommended if you're doing development around the Operator)
task operator-deploy-localThis will install the Operator into the existing Kind cluster that your kconfig.yaml file points to.
Follow the Kind Cluster setup guide.
Once the cluster is running, follow these steps:
- Install the CRD:
helm upgrade -i toolhive-operator-crds oci://ghcr.io/stacklok/toolhive/toolhive-operator-crds- Deploy the operator:
helm upgrade -i toolhive-operator oci://ghcr.io/stacklok/toolhive/toolhive-operator -n toolhive-system --create-namespace- Install the CRD:
helm upgrade -i toolhive-operator-crds oci://ghcr.io/stacklok/toolhive/toolhive-operator-crds- Deploy the operator:
helm upgrade -i toolhive-operator oci://ghcr.io/stacklok/toolhive/toolhive-operator -n toolhive-system --create-namespace