Deploying a software defined storage product across a cluster can be challenging. Among the myriad configuration options, some of the more notable include:
- which nodes should the software run on?
- if choosing to run an external etcd instance, how can I point storage at it?
- how can I specify resource requirements?
This complexity is compounded by the fact that every deployment is different. Some sites have access to the internet, some don’t. Some have special firewall configuration. Some use auto-scaling groups to dynamically manage cluster size.
StorageOS Cluster Operator: Easily Install & Manage StorageOS
We have now released the StorageOS Cluster Operator to solve this challenge. The Cluster Operator installs as a simple Kubernetes Deployment and manages all this complexity on behalf of the user, making installations straightforward and painless.
The operator is released as an opensource project and is available on GitHub.
How it Works
The standard way to run applications on Kubernetes clusters is via the declarative syntax understood by the kubectl command. This YAML based syntax allows us to create Deployments, StatefulSets, DaemonSets, and other artefacts. However sometimes more flexibility is needed. For such scenarios, Kubernetes provides an API to manage its internals directly. This API is available to custom extensions, sometimes known as Operators. Because Operators are written using full programming languages such as Go, more complex logic can be expressed.
In the case of StorageOS, during early customer installations, we discovered that the variety of options required in tweaking our DaemonSet manifests for different sites, orchestrators, distributions and managed platforms could complicate the installation process. Rather than mitigate this with documentation, we wanted an easier way to manage installations. Thus was born the StorageOS Cluster Operator.
The Operator installs as a standard Kubernetes deployment. We offer both a Helm chart and standard manifests for this. Once installed, the Operator defines a Custom Resource Definition which allows StorageOS clusters to be expressed using declarative yaml syntax. Installing a StorageOS cluster is then a simple case of creating appropriate YAML and using kubectl to instantiate it:
kubectl create -f - <<END
The Cluster Operator will ensure that StorageOS is deployed appropriately using any options given to it. We support several configuration options – fully documented in the reference section of our documentation site.
The Operator keeps track of pods in the DaemonSet, and allows us to inspect the state of the cluster via kubectl:
$ kubectl get storageoscluster
NAME READY STATUS AGE
example-storageos 3/3 Running 12m
You can see a list of configurable spec parameters of the StorageOS Cluster Operator custom resource and their default values at our doc site.
Author: Paul Sobey
Paul Sobey is Head of Product at StorageOS. Paul has worked as a systems and infrastructure engineer for over 15 years, responsible for deploying cloud and on-premises infrastructure as well as deploying Kubernetes and containers in production.