Distribute Add-ons
What is Sveltos?
Sveltos is a set of Kubernetes controllers that run in the management cluster. From the management cluster, Sveltos can manage add-ons and applications on a fleet of managed Kubernetes clusters.
Sveltos comes with support to automatically discover Cluster API (CAPI) powered clusters, but it doesn't stop there. We can easily register any other cluster (on-prem, Cloud) and manage Kubernetes add-ons seamlessly.

How does it work?
ClusterProfile and Profile are the Custom Resource Definitions (CRDs) used to instruct Sveltos which add-ons to deploy on a set of clusters.
-
ClusterProfile: It is a cluster-wide resource. It can match any cluster and reference any resource regardless of their namespace.
-
Profile: It is a namespace-scoped resource that is specific to a single namespace. It can only match clusters and reference resources within its own namespace.
By creating a ClusterProfile and Profile instances, we can easily deploy the following points across a set of Kubernetes clusters.
- Helm charts
- Resources assembled with Kustomize
- Raw Kubernetes YAML/JSON manifests
Define which Kubernetes add-ons to deploy and where:
- Select one or more clusters using a Kubernetes label selector;
- List the Kubernetes add-ons that need to be deployed on the selected clusters
Simple as that!
CRDs Details
To get a list of all the available options defined in a ClusterProfile and Profile resources, take a look at the ClusterProfile and the Profile deep dive documentation.
Example: Deploy Kyverno using a ClusterProfile
The example deploys a Kyverno Helm chart in every cluster with the label selector set to env=prod.
Step 1: Register Clusters with Sveltos (non-CAPI clusters)
The first step is to register clusters with Sveltos to receive the required addons and deployments. If the clusters are not registered yet, follow the instructions outlined here.
$ kubectl get sveltosclusters -n projectsveltos --show-labels
NAME READY VERSION LABELS
cluster12 true v1.26.9+rke2r1 sveltos-agent=present
cluster13 true v1.26.9+rke2r1 sveltos-agent=present
Note
The CAPI clusters are detected automatically by Sveltos. They are registered in the projectsveltos namespace by default. If we register the clusters in a different namespace, update the command above.
Step 2: Assign Labels
Once the clusters are registered and in a "READY" state, we can assign labels and start deploying add-ons and applications. For that, we can use the kubectl label command.
$ kubectl label sveltosclusters cluster12 -n projectsveltos env=prod
$ kubectl label sveltosclusters cluster13 -n projectsveltos env=prod
Step 3: Create the ClusterProfile
The third step is to create a ClusterProfile and apply it to the management cluster.
Sveltos ClusterProfile Kyverno
cat > clusterprofile_kyverno.yaml <<EOF
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: kyverno
spec:
clusterSelector:
matchLabels:
env: prod
syncMode: Continuous
helmCharts:
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno
chartVersion: v3.3.3
releaseName: kyverno-latest
releaseNamespace: kyverno
helmChartAction: Install
EOF
$ export KUBECONFIG=/path/to/kubeconfig/management/cluster
$ kubectl apply -f "clusterprofile_kyverno.yaml"
$ sveltosctl show addons
+--------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+
| CLUSTER | RESOURCE TYPE | NAMESPACE | NAME | VERSION | TIME | CLUSTER PROFILES |
+--------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+
| projectsveltos/cluster12 | helm chart | kyverno | kyverno-latest | 3.2.5 | 2023-12-16 00:14:17 -0800 PST | kyverno |
| projectsveltos/cluster13 | helm chart | kyverno | kyverno-latest | 3.2.5 | 2023-12-16 00:14:17 -0800 PST | kyverno |
+--------------------------+---------------+-----------+----------------+---------+-------------------------------+------------------+


Note
To explore and install the sveltosctl utility, take a look at the installation guide found here.
More Resources
The easiest way to try out Sveltos is by following the Quick Start guide. If you prefer a video demonstration, watch the Sveltos introduction video on YouTube.