Overview
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 .
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 library to make writing operators easier by providing:
- High level APIs and abstractions to write the operational logic more intuitively
- Tools for scaffolding and code generation to bootstrap a new project fast
- Extensions to cover common operator use cases
Workflow
The SDK provides workflows to develop operators in Go, Ansible, or Helm.
The following workflow is for a new :
- Create a new operator project using the SDK Command Line Interface(CLI)
- Define new resource APIs by adding Custom Resource Definitions(CRD)
- Define Controllers to watch and reconcile resources
- Use the SDK CLI to build and generate the operator deployment manifests
- Create a new operator project using the SDK Command Line Interface(CLI)
- Write the reconciling logic for your object using ansible playbooks and roles
- Use the SDK CLI to build and generate the operator deployment manifests
- Optionally add additional CRD’s using the SDK CLI and repeat steps 2 and 3
The following workflow is for a new Helm operator:
- Create a new operator project using the SDK Command Line Interface(CLI)
- Create a new (or add your existing) Helm chart for use by the operator’s reconciling logic
- Optionally add additional CRD’s using the SDK CLI and repeat steps 2 and 3
To learn more about the SDK CLI, see the , or run .
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.
Samples
For common Operator SDK related questions, see the FAQ.
Contributing
See CONTRIBUTING for details on submitting patches and the contribution workflow.
See the and issues for ongoing or planned work.
See reporting bugs for details about reporting any issues.
License
Operator SDK is under Apache 2.0 license. See the LICENSE file for details.