Kubernetes operator for Grafana Cloud Fleet Management — declare Alloy collector pipelines as custom resources and reconcile them continuously.
Developer toolsGo · JustGitHub @rknightionOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
A Kubernetes operator for managing Grafana Cloud Fleet Management Pipelines as native Kubernetes resources.
Disclaimer: This is not an official Grafana Labs product and is not officially supported by Grafana Labs. This is a community project provided as-is. For official Grafana Cloud Fleet Management support, please contact Grafana Support.Read the full README ↗A Kubernetes operator for managing Grafana Cloud Fleet Management Pipelines as native Kubernetes resources.
Disclaimer: This is not an official Grafana Labs product and is not officially supported by Grafana Labs. This is a community project provided as-is. For official Grafana Cloud Fleet Management support, please contact Grafana Support.
This operator enables declarative management of Fleet Management configuration pipelines using Kubernetes. Define your Alloy or OpenTelemetry Collector configurations as Kubernetes resources, and the operator automatically syncs them to Grafana Cloud Fleet Management.
This operator manages the following CRD types:
| CRD | Purpose |
|---|---|
| Pipeline | Deploy Alloy or OpenTelemetry Collector config fragments to matching collectors |
| PipelineDiscovery | Import Fleet Management pipelines as Kubernetes Pipeline CRs |
| Collector | Manage remote attributes for a specific collector by ID |
| CollectorDiscovery | Auto-discover Fleet Management collectors and create Collector CRs |
| RemoteAttributePolicy | Assign default attributes to collectors matching a selector |
| ExternalAttributeSync | Sync collector attributes from an external HTTP or SQL source |
| TenantPolicy | Enforce RBAC tenancy by requiring specific matchers on CRs |
See Sample CRs for runnable examples of every type.
Get credentials from your Grafana Cloud Fleet Management interface:
# Ensure the default webhook issuer exists, or override webhook.certManager.issuerRef
kubectl apply -f - <<'EOF'
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
EOF
# Install the operator
helm install fleet-management-operator \
oci://ghcr.io/rknightion/charts/fleet-management-operator \
--namespace fleet-management-system \
--create-namespace \
--set fleetManagement.baseUrl='https://fleet-management-<CLUSTER>.grafana.net/pipeline.v1.PipelineService/' \
--set fleetManagement.username='<STACK_ID>' \
--set fleetManagement.password='<API_TOKEN>'
Prefer this over inline --set values for anything beyond a quick test; point
fleetManagement.existingSecret at it.
kubectl create namespace fleet-management-system
kubectl create secret generic fleet-management-operator-credentials \
-n fleet-management-system \
--from-literal=base-url='https://fleet-management-<CLUSTER>.grafana.net/pipeline.v1.PipelineService/' \
--from-literal=username='<STACK_ID>' \
--from-literal=password='<API_TOKEN>'
Create a Pipeline resource to define your Alloy or OpenTelemetry Collector configuration. See Sample CRs for full working examples of both Alloy and OpenTelemetry Collector pipelines.
Apply a pipeline:
kubectl apply -n <namespace> -f pipeline.yaml
# List all pipelines
kubectl get pipelines -n <namespace>
# Get detailed status
kubectl describe pipeline prometheus-metrics -n <namespace>
# Watch for changes
kubectl get pipelines -n <namespace> -w
The status shows the Fleet Management pipeline ID and sync state:
status:
id: "12345"
observedGeneration: 1
conditions:
- type: Ready
status: "True"
reason: Synced
- type: Synced
status: "True"
reason: UpsertSucceeded
Edit the Pipeline resource and apply changes:
kubectl edit pipeline prometheus-metrics
The operator automatically syncs changes to Fleet Management.
kubectl delete pipeline prometheus-metrics -n <namespace>
The operator removes the pipeline from Fleet Management before deleting the Kubernetes resource.
Pipelines are assigned to collectors using matchers with Prometheus Alertmanager syntax:
key=value - Equalskey!=value - Not equalskey=~regex - Regex matchkey!~regex - Regex not matchExample:
matchers:
- collector.os=linux
- environment!=development
- region=~us-.*
The configType must match your collector type.
Track pipeline origins with the source field:
spec:
source:
type: Git # or Terraform, Grafana, Unspecified
namespace: github.com/myorg/configs
Grafana-sourced pipelines are observed as read-only. For discovered pipelines,
fleetmanagement.grafana.com/import-mode=read-only means the operator mirrors
Fleet status without creating or updating the remote pipeline.
Check controller logs:
kubectl logs -n fleet-management-system -l app.kubernetes.io/name=fleet-management-operator
Check pipeline status:
kubectl describe pipeline <pipeline-name>
Look for error messages in status.conditions.
Authentication error:
Validation error:
status.conditions for specific validation errorsconfigType matches the configuration syntax (Alloy vs OTEL)Rate limit exceeded:
Pipeline stuck in Terminating:
With Helm:
helm uninstall fleet-management-operator -n fleet-management-system
kubectl delete namespace fleet-management-system
Contributions are welcome! See CONTRIBUTING.md for development setup, testing, and contribution guidelines.
Copyright 2026.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
values.yaml via just chart-docsapi/v1alpha1/*_types.goThe generated reference pages above are updated by just docs; CI fails the
build if they drift from source.