The Flux Operator is a Kubernetes controller that manages the lifecycle of CNCF Flux CD and the ControlPlane enterprise distribution. It extends Flux with self-service capabilities, deployment windows, and preview environments for testing pull requests from various Git platforms.
The operator automates the installation, configuration, and upgrade of Flux controllers based on a declarative API, removing the operational burden of managing Flux across multiple clusters.
Simplifies configuration of Flux multi-tenancy lockdown, sharding, scaling, persistent storage, and allows fine-tuning controllers with Kustomize patches. It streamlines the transition from Git to OCI artifacts and S3-compatible storage.
Provides detailed reports and Prometheus metrics about Flux controllers' readiness status, reconcilers statistics, and cluster state synchronization.
The ResourceSet API enables platform teams to define application standards as groups of resources that can be deployed as a single unit on self-service environments, with pull request integration for ephemeral testing environments.
The Flux MCP Server connects AI assistants to Kubernetes clusters, enabling natural language interaction for analyzing deployments, troubleshooting issues, and performing operations.
Install the Flux Operator in the flux-system
namespace using Helm:
helm install flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator \
--namespace flux-system
Create a FluxInstance resource to install the latest Flux stable version:
apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
metadata:
name: flux
namespace: flux-system
annotations:
fluxcd.controlplane.io/reconcileEvery: "1h"
fluxcd.controlplane.io/reconcileArtifactEvery: "10m"
fluxcd.controlplane.io/reconcileTimeout: "5m"
spec:
distribution:
version: "2.x"
registry: "ghcr.io/fluxcd"
artifact: "oci://ghcr.io/controlplaneio-fluxcd/flux-operator-manifests"
components:
- source-controller
- kustomize-controller
- helm-controller
- notification-controller
- image-reflector-controller
- image-automation-controller
cluster:
type: kubernetes
multitenant: false
networkPolicy: true
domain: "cluster.local"
kustomize:
patches:
- target:
kind: Deployment
name: "(kustomize-controller|helm-controller)"
patch: |
- op: add
path: /spec/template/spec/containers/0/args/-
value: --concurrent=10
- op: add
path: /spec/template/spec/containers/0/args/-
value: --requeue-dependency=5s
To sync your cluster state from a Git repository, add the following configuration to your FluxInstance:
apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
metadata:
name: flux
namespace: flux-system
spec:
sync:
kind: GitRepository
url: "https://github.com/my-org/my-fleet.git"
ref: "refs/heads/main"
path: "clusters/my-cluster"
pullSecret: "flux-system"
# distribution omitted for brevity
For private repositories, create a Kubernetes secret with your credentials:
flux create secret git flux-system \
--url=https://github.com/my-org/my-fleet.git \
--username=git \
--password=$GITHUB_TOKEN
Check the FluxReport resource to monitor the deployment status:
kubectl get fluxreport/flux -n flux-system -o yaml
The report is updated regularly and contains information about deployment readiness, distribution details, reconciler statistics, CRD versions, and sync status.
The ResourceSet APIs provide a high-level abstraction for managing Flux resources and Kubernetes objects as a single unit. They simplify GitOps workflows and enable self-service for developers and platform teams.
Key capabilities include:
For detailed configuration examples and additional usage information, visit the ResourceSets documentation.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "flux-operator" '{"command":"npx","args":["-y","@controlplane/flux-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"flux-operator": {
"command": "npx",
"args": [
"-y",
"@controlplane/flux-mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"flux-operator": {
"command": "npx",
"args": [
"-y",
"@controlplane/flux-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect