Install
What is Sveltos?
Sveltos is a set of Kubernetes controllers deployed in the management cluster. From the management cluster, it can manage add-ons and applications to multiple clusters.
Note
cert-manager
is required in the management cluster. If cert-manager is not available in the cluster, Sveltos will not wotk as expected.
General information about cert-manager, have a look here.
Installation Modes
Sveltos supports two modes: Mode 1 and Mode 2.
-
Mode 1: Will deploy up to two agents, sveltos-agent and drift-detection-manager1, in each managed cluster.
-
Mode 2: Sveltos agents will be created, per managed cluster, in the management cluster2. The agents, while centrally located, will still monitor their designated managed cluster’s API server.
Dashboard is an optional component of Sveltos. To include it in your deployment, follow the instructions in the dashboard section.
Mode 1: Local Agent Mode
To install Sveltos in mode 1, run the commands below.
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/manifest.yaml
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/default-classifier.yaml
Mode 2: Centralised Agent Mode
If you do not want to have any Sveltos agent in any managed cluster, run the commands below.
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/agents_in_mgmt_cluster_manifest.yaml
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/default-classifier.yaml
Sveltos uses the git-flow branching model. The base branch is dev. If you are looking for latest features, please use the dev branch. If you are looking for a stable version, please use the main branch or tags labeled as v0.x.x.
Warning
Both deployments will perform the Sveltos installation in the projectsveltos
namespace.
Tip
For production environments, using a release tag instead of the 'main' branch is recommended to ensure a smooth upgrade process for Sveltos applications.
Deployment Options
Sveltos can be installed as a Helm chart or with Kustomize. By default, Mode 1 will get deployed unless otherwise specified.
Warning
Ensure Sveltos is deployed in the projectsveltos
namespace. This is a requirement.
Helm Installation
$ helm repo add projectsveltos https://projectsveltos.github.io/helm-charts
$ helm repo update
$ helm install projectsveltos projectsveltos/projectsveltos -n projectsveltos --create-namespace
$ helm list -n projectsveltos
Note
When deploying Sveltos with Helm, the helm upgrade
command won't automatically update Sveltos's Custom Resource Definitions (CRDs). To ensure CRDs are updated, run this command before upgrading Sveltos.
Kustomize Installation
Mode 1: Local Agent Mode
$ kustomize build https://github.com/projectsveltos/sveltos.git//kustomize/base\?timeout\=120\&ref\=main |kubectl apply -f -
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/default-classifier.yaml
Mode 2: Centralised Agent Mode
$ kustomize build https://github.com/projectsveltos/sveltos.git//kustomize/overlays/agentless-mode\?timeout\=120\&ref\=main |kubectl apply -f -
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/default-classifier.yaml
Sveltos Verification
Get the Sveltos status and verify that all pods are Up and Running.
projectsveltos access-manager-69d7fd69fc-7r4lw 2/2 Running 0 40s
projectsveltos addon-controller-df8965884-x7hp5 2/2 Running 0 40s
projectsveltos classifier-manager-6489f67447-52xd6 2/2 Running 0 40s
projectsveltos hc-manager-7b6d7c4968-x8f7b 2/2 Running 0 39s
projectsveltos sc-manager-cb6786669-9qzdw 2/2 Running 0 40s
projectsveltos event-manager-7b885dbd4c-tmn6m 2/2 Running 0 40s
Dashboard
$ kubectl apply -f https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/dashboard-manifest.yaml
To access the dashboard, you'll need to expose the dashboard
service in the projectsveltos
namespace.
Currently, it's configured as a ClusterIP service, which limits access to within the cluster. To expose it externally, you can either change the service type to LoadBalancer or utilize an Ingress/Gateway API.
Note
v0.38.4 is the first Sveltos release that includes dashboard.
Next Steps
Contiunue with the Sveltoctl command-line interface (CLI) definition and installation here.
-
sveltos-agent will be deployed if there is at least one Classifier instance in the management cluster. Drift detection manager will be deployed if there is a ClusterProfile instance with SyncMode set to ContinuousWithDriftDetection. ↩
-
If Prometheus operator is not present in your management cluster, you will see (and can ignore) following error: error: unable to recognize "https://raw.githubusercontent.com/projectsveltos/sveltos/main/manifest/manifest.yaml": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1" ↩