Replies: 5 comments
-
Hi @rbjorklin yes. You can do that. I usually start with a kind cluster where I deploy Sveltos. Then create my management cluster (usually using Civo). Register this cluster with Sveltos in the kind cluster. Then deploy Sveltos there so I can kill my Kind cluster and use my Civo cluster as my new management cluster. In other words, if you have a managed cluster that you want to transform in your new management cluster, you can use a ClusterProfile to deploy Sveltos into such a managed cluster. After that succeeds, that managed cluster becomes your new management cluster. apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: projectsveltos
spec:
clusterSelector:
matchLabels:
env: fv
syncMode: Continuous
helmCharts:
- repositoryURL: oci://registry-1.docker.io/gianlucam76
repositoryName: projectsveltos
chartName: projectsveltos
chartVersion: 0.38.1
releaseName: projectsveltos
releaseNamespace: projectsveltos
helmChartAction: Install
registryCredentialsConfig:
credentials:
name: regcred
namespace: default keep in mind that Sveltos requires cert-manager in the management cluster. So if you don't have that, you can add it apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: projectsveltos
spec:
clusterSelector:
matchLabels:
env: fv
syncMode: Continuous
helmCharts:
- repositoryURL: https://charts.jetstack.io
repositoryName: jetstack
chartName: jetstack/cert-manager
chartVersion: v1.15.3
releaseName: cert-manager
releaseNamespace: cert-manager
helmChartAction: Install
- repositoryURL: oci://registry-1.docker.io/gianlucam76
repositoryName: projectsveltos
chartName: projectsveltos
chartVersion: 0.38.1
releaseName: projectsveltos
releaseNamespace: projectsveltos
helmChartAction: Install
registryCredentialsConfig:
credentials:
name: regcred
namespace: default |
Beta Was this translation helpful? Give feedback.
-
I've tried this and ended up in a bad state where Project Sveltos effectively deletes all the resources in my cluster. I think what happened was that I introduced a mistake in my |
Beta Was this translation helpful? Give feedback.
-
Thanks @rbjorklin I will give this a try again on Monday. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @rbjorklin this is what I did:
This is how I deployed projectsveltos from the kind cluster to the Civo cluster. apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: deploy-cert-manager
spec:
clusterSelector:
matchLabels:
env: mgmt
syncMode: Continuous
helmCharts:
- repositoryURL: https://charts.jetstack.io
repositoryName: jetstack
chartName: jetstack/cert-manager
chartVersion: v1.16.0
releaseName: cert-manager
releaseNamespace: cert-manager
helmChartAction: Install
values: |
crds:
enabled: true apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: deploy-projectsveltos
spec:
clusterSelector:
matchLabels:
env: mgmt
dependsOn:
- deploy-cert-manager
syncMode: Continuous
helmCharts:
- repositoryURL: https://projectsveltos.github.io/helm-charts
repositoryName: projectsveltos
chartName: projectsveltos/projectsveltos
chartVersion: v0.38.4
releaseName: projectsveltos
releaseNamespace: projectsveltos
helmChartAction: Install
In this state I created another Civo cluster and registered it to be managed by Sveltos running in the other Civo cluster. And deployed Kyverno
while in this state I triggered Sveltos upgrade from v0.38.4 to v0.39.0 by changing the ClusterProfile deploy-projectsveltos in the kind cluster. Sveltos upgrade went through without removing anything. PS: You might see projectsveltos deployment fail due to
while pointing to the civo mgmt cluster just issue I will fix this in next release |
Beta Was this translation helpful? Give feedback.
-
The error using Helm to upgrade is fixed in v0.40.0 |
Beta Was this translation helpful? Give feedback.
-
Say I want to make sure my project sveltos deployment always mirrors what is in a git repository. Is it safe to create a ClusterProfile to apply project sveltos to a management cluster?
Beta Was this translation helpful? Give feedback.
All reactions