DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • GitOps: Flux vs Argo CD
  • Key Considerations When Implementing Virtual Kubernetes Clusters
  • The Open Source Way to Rightsize Kubernetes With One Click
  • Pulsar on KubeSphere: Installing Distributed Messaging and Streaming Platform

Trending

  • Intro to RAG: Foundations of Retrieval Augmented Generation, Part 1
  • Integration Isn’t a Task — It’s an Architectural Discipline
  • Automating Data Pipelines: Generating PySpark and SQL Jobs With LLMs in Cloudera
  • 5 Subtle Indicators Your Development Environment Is Under Siege
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. Kubernetes Add-On Lifecycle Management With Sveltos

Kubernetes Add-On Lifecycle Management With Sveltos

Sveltos simplifies Kubernetes add-on deployment across clusters, automating upgrades based on cluster runtime and offering an event-driven workflow automation framework.

By 
Gianluca Mardente user avatar
Gianluca Mardente
·
May. 03, 23 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
4.9K Views

Join the DZone community and get the full member experience.

Join For Free

Kubernetes itself is not a complete solution. To build a production cluster, you need various additional add-ons. If you are managing multiple clusters, that is not an easy task.

Sveltos is an open-source project that provides declarative APIs allowing the deployment of Kubernetes add-ons across multiple Kubernetes clusters. Both Helm charts and resource YAMLs can be passed to Sveltos.

For instance, just posting the following ClusterProfile instance is sufficient to deploy the Kyverno Helm chart in a set of managed clusters:
ClusterProfile instance

Or if you have Kubernetes resource YAMLs, just create a ConfigMap (or Secret if data is confidential) with the data and then have Sveltos reference such ConfigMap (Secret) instance.

kubectl create configmap contour-gateway --from-file=<File with contour YAML>

API version

To make things more complex, some of the time, the add-ons that you need to deploy depend on the cluster run-time state.

For instance, you have deployed Calico v3.24 in a set of clusters. As those clusters get upgraded to Kubernetes v1.25, you want Calico to be upgraded to v3.25 as well.

If you are managing tens of such clusters, manually upgrading Calico when the Kubernetes version is upgraded is not ideal. You need an automated solution for that.

automated solution

Then simply create the following Classifier instances:

Classifier Instances

Above Classifier instances will have Sveltos manage Cluster labels by automatically adding:

  • label kubernetes: v1–24 to any cluster running Kubernetes version v1.24.x
  • label kubernetes: v1–25 to any cluster running Kubernetes version v1.25.x.

Because of those labels and the above ClusterProfile instances:

  • calico version v3.24.5 will be deployed in any cluster running Kubernetes version v1.24.x
  • calico version v3.25.0 will be deployed in any cluster running Kubernetes version v1.25.x

No action is required on your side. As clusters are upgraded, Sveltos will upgrade Calico as well.

Things might get more complicated when the add-ons need to be deployed as a result of an event in a managed cluster. For instance, any time a Service in a certain namespace is created, adds an HTTPRoute to expose such a service via Gateway API.

Sveltos Events is an event-driven workflow automation framework for Kubernetes which helps you trigger K8s add-on deployments on various events.

  1. Define what an Event is (Sveltos supports Lua script for that);
  2. Define what add-ons to deploy when such an event happens. Add-ons can be expressed as templates, and Sveltos will instantiate those at deployment time using information from managed clusters.

EventSource

This EventSource is defining an event as the creation/deletion of a Service in the namespace eng exposing either port 443 or port 8443.

When such an event happens in a managed cluster, we want to deploy an HTTPRoute instance:

managed cluster

As you can see, what to deploy is defined in a ConfigMap, and it is expressed as a template.

Resources contain all the Service instances in each managed cluster matching the EventSource defined above.

Kubernetes Open source cluster DevOps

Published at DZone with permission of Gianluca Mardente. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • GitOps: Flux vs Argo CD
  • Key Considerations When Implementing Virtual Kubernetes Clusters
  • The Open Source Way to Rightsize Kubernetes With One Click
  • Pulsar on KubeSphere: Installing Distributed Messaging and Streaming Platform

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!