Project Layout
A description of the layout of projects built with Operator SDK
This project is a component of the Operator Framework, an open source toolkit to manage Kubernetes native applications, called Operators, in an effective, automated, and scalable way. Read more in the introduction blog post.
Operators make it easy to manage complex stateful applications on top of Kubernetes. However writing an operator today can be difficult because of challenges such as using low level APIs, writing boilerplate, and a lack of modularity which leads to duplication.
The Operator SDK is a framework that uses the controller-runtime library to make writing operators easier by providing:
The SDK provides workflows to develop operators in Go, Ansible, or Helm.
The following workflow is for a new Go operator:
The following workflow is for a new Ansible operator:
The following workflow is for a new Helm operator:
To learn more about the SDK CLI, see the SDK CLI Reference, or run operator-sdk [command] -h
.
Note that each operator type has a different set of capabilities. When choosing what type to use for your project, it is important to understand the features and limitations of each of the project types and the use cases for your operator.
Find more details about the various levels and the feature requirements for them in the capability level documentation.
Each operator-sdk
release is tested with a specific version of Kubernetes. This version matches
that of kubernetes/kubernetes or client-go that operator-sdk
depends on directly,
or that generated Operator projects depend on.
In general, client-go’s compatibility matrix will determine whether
a particular Kubernetes version is compatible with a particular operator-sdk
version
or generated Operator project. The following tables contains the canonical way per
binary or project type to look up a Y-axis version to plug into the compatibility matrix.
By binary:
Binary | Lookup strategy | Kubernetes version | client-go version |
---|---|---|---|
operator-sdk |
$ operator-sdk version |
1.29.0 |
v0.29.3 |
ansible-operator |
$ ansible-operator version |
1.29.0 |
v0.29.3 |
helm-operator |
$ helm-operator version |
1.29.0 |
v0.29.3 |
By project type (replace ${IMAGE_VERSION}
with base image version in your project Dockerfile
):
Project type | Lookup strategy |
---|---|
Go | controller-runtime version (see go.mod ) |
Ansible | $ docker run --entrypoint ansible-operator quay.io/operator-framework/ansible-operator:${IMAGE_VERSION} version |
Helm | $ docker run --entrypoint helm-operator quay.io/operator-framework/helm-operator:${IMAGE_VERSION} version |
Operator SDK officially supports the latest 3 minor versions of OLM present at the time of a given Operator SDK release. These versions of OLM manifests are packaged with the SDK binary in the form of bindata
to support low-latency installations of OLM with operator-sdk olm install
. Any other version installed with this command may work but is not tested nor officially supported.
Currently, the officially supported OLM Versions are: 0.26.0, 0.27.0, and 0.28.0
Official build architectures for binaries:
Binary | linux/amd64 |
linux/arm64 |
linux/ppc64le |
linux/s390x |
darwin/amd64 |
darwin/arm64 |
---|---|---|---|---|---|---|
operator-sdk |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
ansible-operator |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
helm-operator |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Official build architectures for images:
Binary | linux/amd64 |
linux/arm64 |
linux/ppc64le |
linux/s390x |
---|---|---|---|---|
operator-sdk |
✓ | ✓ | ✓ | ✓ |
ansible-operator |
✓ | ✓ | ✓ | ✓ |
helm-operator |
✓ | ✓ | ✓ | ✓ |
scorecard-test |
✓ | ✓ | ✓ | ✓ |
scorecard-test-kuttl |
✓ | ✓ | ✓ | - |
Official support for any Windows architecture is not on the roadmap at this time.
To explore any operator samples built using the operator-sdk, see the samples in operator-sdk/testdata/.
For common Operator SDK related questions, see the FAQ.
See CONTRIBUTING for details on submitting patches and the contribution workflow.
See the proposal docs and issues for ongoing or planned work.
See reporting bugs for details about reporting any issues.
Operator SDK is under Apache 2.0 license. See the LICENSE file for details.
A description of the layout of projects built with Operator SDK
Operator-SDK Cheat Sheet commands and operations