spin-operator

Spin Operator

What Is Spin Operator?

Spin Operator is a Kubernetes operator which empowers platform engineers to deploy Spin applications as custom resources to their Kubernetes clusters. Spin Operator provides an elegant solution for platform engineers looking to improve efficiency without compromising on performance while maintaining workload portability.

Why Spin Operator?

By bringing the power of the Spin framework to Kubernetes clusters, Spin Operator provides application developers and platform engineers with the best of both worlds. For developers, this means easily building portable serverless functions that leverage the power and performance of Wasm via the Spin developer tool. For platform engineers, this means using idiomatic Kubernetes primitives (secrets, autoscaling, etc.) and tooling to manage these workloads at scale in a production environment, improving their overall operational efficiency.

How Does Spin Operator Work?

Built with the kubebuilder framework, Spin Operator is a Kubernetes operator. Kubernetes operators are used to extend Kubernetes automation to new objects, defined as custom resources, without modifying the Kubernetes API. The Spin Operator is composed of two main components:

  • A controller that defines and manages Wasm workloads on k8s.
  • The “SpinApps” Custom Resource Definition (CRD).

SpinApps CRDs can be composed manually or generated automatically from an existing Spin application using the spin kube scaffold command. The former approach lends itself well to CI/CD systems, whereas the latter is a better fit for local testing as part of a local developer workflow.

Once an application deployment begins, Spin Operator handles scheduling the workload on the appropriate nodes (thanks to the Runtime Class Manager, previously known as Kwasm) and managing the resource’s lifecycle. There is no need to fetch the containerd shim spin binary or mutate node labels. This is all managed via the Runtime Class Manager, which you will install as a dependency when setting up Spin Operator.

Next Steps

For application developers interested in writing their first Spin App, check out the spin kube plugin documentation. By the end of the quickstart, you’ll have an application ready to deploy to your Kubernetes cluster of choice.

For platform engineers interested in cluster operations and working with Spin Operator, visit our Spin Operator quickstart. We provide you with a simple quickstart SpinApp to use alongside spin operator.


Prerequisites

Prerequisites

Quickstart

Learn how to setup a Kubernetes cluster, install the Spin Operator and run your first Spin App

Installation

Learn how to install Spin Operator

Tutorials

This section consists of tutorials in the context of Spin Operator

Support

This section provides support resources in the context of Spin Operator

Reference

Reference documentation for Custom Resource Definitions (CRDs)

Contributing

Contributing to Spin Operator