Skip to main content
Dan Norris
Dan Norris
Dan Norris
Joonas Bergius
Joonas Bergius
Joonas Bergius
||5 min read

WebAssembly on Kubernetes with Argo CD and Cosmonic

  • Seamlessly operate WebAssembly across any K8s distribution via GitOps pipeline
  • Orchestrate CNCF wasmCloud across K8s with Kubernetes Custom Resource Definition (CRD)
  • Wadm supercharges Cosmonic Connect Kubernetes to create new Kubernetes controller

Earlier this year, we released cosmo connect k8s designed as a way for Kubernetes users to bridge the two worlds between WebAssembly and K8s. What Cosmo Connect Kubernetes was missing were some of the key Day 1, Day 2 features that platform engineers have come to expect. So, we’ve supercharged it by adding a Kubernetes controller with support for wasmCloud’s Application Deployment Manager (Wadm) to bring declarative application management to WebAssembly applications running in Kubernetes and unlock the upcoming capabilities from WASI .2 and the Component Model! This new, feature-laden controller makes it significantly easier to provision and manage WebAssembly natively with the tools you already know and love using Kubernetes.

To bring this to life, we put together a useful demonstration showing the controller in action. You can follow along using this Argo CD GitOps for WebAssembly on Kubernetes Demonstration repository and watch the demonstration here:

Cosmo Connect Kubernetes was built from the ground up to enable connecting existing Kubernetes clusters in order to unlock the resource efficiencies and speed of the Cosmonic Platform, without sacrificing or altering the existing infrastructure. Now, the newly integrated controller gives Kubernetes fans the ability to manage all of their Container and WebAssembly deployments powered by Wadm natively from within Kubernetes.

Under the hood, we have also added a Custom Resource Definition (CRD) that represents a wasmCloud host connected into Cosmonic’s platform. This enables you to enjoy the same benefits of declarative state for easily extending and scaling out your wasmCloud hosts using your pre-existing Kubernetes clusters, in essence allowing you to bring together the best of both worlds with ease.

A GitOps Approach to Managing WebAssembly in Kubernetes

The really exciting bit is, for anyone working with GitOps in Kubernetes — particularly those with Argo CD or Flux already set up — they can check in a Wadm manifest into Git and witness their Cosmonic applications become managed exactly the same way they would in any other Kubernetes application.

Once a Wadm application is under management of your favorite GitOps tool, you can begin to iterate on the application following the workflow you have become accustomed to: making changes to the application manifest, and watching your favorite GitOps tool coordinate rolling out the changes with Wadm.

GitOps has taken the world by storm over the last couple of years and spend is expected to grow through 2025 and beyond. By the end of last year, over half of CNCF users were already using or considering adopting Argo CD or Flux. Companies everywhere are investing in GitOps to accelerate their application development cycles, which is why we have taken this step to add this integration to enable these capabilities in our Kubernetes controller.

Compatible with K8s, but not dependent upon...

While in this blog post, and in the above demonstration, we are highlighting the incredible integration and compatibility with Kubernetes, Cosmonic makes it easy to extend those same applications to any cloud or edge without modification. Distribute your applications across different Kubernetes clusters. Distribute your WebAssembly applications across regions. Distribute them across them clouds. Distribute them across edges. Run them in your own data centers and across clouds.

WebAssembly on Kubernetes with Argo CD GitOps Architecture with Cosmonic

The possibilities are endless.

Finishing Touches

With the initial integration now complete, we would like to highlight a few more areas of development for you to look forward to in the near future:

Support for Private Registry Configurations

We are extending the controller with support that allows you to provide credentials to your private OCI registries for the wasmCloud hosts deployed inside of your cluster. This will be in addition to the capability from the Cosmonic platform that automatically configures your connected hosts with credentials for pulling down artifacts from our hosted registry. While this automated configuration is ideal for getting started quickly, we recognize that for anyone evaluating wasmCloud for production use, the ability to securely add your own private registry credentials is important, and so this capability will follow soon.

Making Load Management a Breeze

Next up, we have some ideas on how to make load management a little easier. For instance, we’d love to make it possible to tie a constellation to a Kubernetes namespace, and have the controller manage that for you. This is distinct from what we can already do on the open source front, because the controller interacts with the Kubernetes API to facilitate it.

Enabling the Enterprise

Organizations have invested heavily in Kubernetes and so it is important for us to help compound the return on that investment, by extending the capabilities of pre-existing Kubernetes clusters, by adding support for native WebAssembly functionality. We believe that this will enable organizations to safely experiment with the rapidly emerging WebAssembly ecosystem while following the way they know, love and trust. We’re moving ever closer to a world where companies can benefit from the agility, composability and portability of Wasm in existing Kubernetes estates; with all the management tools that enterprise platform engineers expect.

Live Demo

Join us soon for a live demo of the new Kubernetes controller in action. More details to follow on our social channels X, Discord and LinkedIn!

Want to send your application into orbit?

Get in touch for a demo
Book Now