Managing multiple Kubernetes clusters can be a daunting task, especially when it comes to deploying and managing add-ons and applications. Fortunately, Sveltos, a Kubernetes add-on controller, simplifies this process. In this article, we’ll guide you through the essentials of using Sveltos for effective cluster management.
What is Sveltos?
Sveltos operates in the management cluster and can programmatically deploy and manage add-ons across various clusters in your fleet, including the management cluster itself. It supports formats like Helm charts, raw YAML, Kustomize, Carvel ytt, and Jsonnet, allowing for flexibility and ease.
How Sveltos Works: An Analogy
Imagine you are an orchestra conductor leading a symphony. Each instrument represents a different Kubernetes cluster, and the score represents the Sveltos configurations for deploying add-ons and applications. Just as a conductor ensures that all instruments play in harmony at the right time, Sveltos manages the deployment of add-ons across your clusters, ensuring that they all play together seamlessly.
Profiles vs. ClusterProfiles
Sveltos offers Profiles and ClusterProfiles to manage configurations:
- ClusterProfiles: Apply across all clusters in any namespace, ensuring global consistency for platform admins.
- Profiles: Limited to specific namespaces, giving tenant admins granular control over their managed clusters.
Add-on Deployment: How It Works
The deployment process through Sveltos is straightforward:
- Select one or more clusters using a Kubernetes label selector.
- List which add-ons need to be deployed on those clusters.
For instance, if you want CAPI clusters with the label env: prod to have specific features deployed, you can create a ClusterProfile like this:
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: deploy-kyverno
spec:
clusterSelector:
matchLabels:
env: prod
syncMode: Continuous
helmCharts:
- repositoryURL: https://kyverno.github.io/kyverno
repositoryName: kyverno
chartName: kyverno
chartVersion: v3.0.1
releaseName: kyverno-latest
releaseNamespace: kyverno
helmChartAction: Install
values:
admissionController:
replicas: 3
policyRefs:
- name: storage-class
namespace: default
kind: Secret
- name: contour-gateway
namespace: default
kind: ConfigMap
Different Sync Modes
Sveltos offers three sync modes:
- OneTime: For initial setup during cluster bootstrapping.
- Continuous: Continuously monitors and applies changes, ensuring consistency.
- ContinuousWithDriftDetection: Detects and corrects configuration drifts automatically.
Troubleshooting and Additional Tips
If you run into issues while using Sveltos, consider the following troubleshooting tips:
- Make sure your clusters are correctly labeled to match the selectors in your profiles.
- Verify that your add-on configurations are correct and compatible with your cluster versions.
- Check for any network or permission issues that may be affecting communication between the management and managed clusters.
- For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
Using Sveltos can greatly simplify your management of Kubernetes clusters, enabling easy deployment and management of add-ons across your environments. Understanding Profiles and ClusterProfiles, along with effective deployment strategies, will make your cluster management seamless.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Get Started with Sveltos
To begin exploring Sveltos, clone the GitHub repository and run a quick setup:
git clone https://github.com/projectsveltos/addon-controller
make quickstart
This command will create a management cluster using Kind and deploy the necessary components to get you started with Sveltos.
Useful Links
With this comprehensive guide, you can now embrace Sveltos and make your Kubernetes deployments smarter and more manageable!

