The Kubernetes Kops Operator is a Kubernetes operator that manages kOps clusters using the Kubernetes API. It follows the Cluster API pattern to provide a declarative way to manage Kubernetes clusters using kOps as the infrastructure provider.
- Declarative cluster management using Kubernetes custom resources
- Compatibility with Cluster API project:
- Implements Cluster API's control plane and infrastructure provider interfaces
- Supports Cluster API's cluster lifecycle management
- Integrates with Cluster API's machine deployment and machine pool concepts
- Support for AWS infrastructure
- Karpenter integration for node provisioning (v1 NodePools)
- SpotInst integration for cost optimization
- Custom resource management for kOps clusters
- Automated cluster validation and health checks
The operator consists of several key components:
-
KopsControlPlane (
controlplane.cluster.x-k8s.io/v1alpha1
)- Manages the control plane of kOps clusters
- Handles cluster configuration and lifecycle
- Manages worker node pools through KopsMachinePool resources
- Supports SpotInst integration
- Integrates with Karpenter for node provisioning
-
KopsMachinePool (
infrastructure.cluster.x-k8s.io/v1alpha1
)- Defines worker node pool configurations
- Supports Karpenter NodePools for node provisioning
- Configures instance groups and node templates
- KopsControlPlane Controller:
- Manages the complete lifecycle of kOps clusters
- Handles both control plane and worker node pool management
- Integrates with Karpenter for node provisioning
- Manages SpotInst resources when enabled
- Kubernetes cluster (for running the operator)
- Cluster API core components installed:
- cluster-api-controller
- cluster-api-bootstrap-controller
- cluster-api-control-plane-controller
- AWS credentials configured
- kOps CLI installed (for development)
- Go 1.23.5 or later
- kubebuilder v3
- Define your KopsControlPlane resource
- Define KopsMachinePool resources for worker nodes
- Apply the resources to your Kubernetes cluster
The operator supports two methods for node management:
- Traditional kOps instance groups
- Karpenter NodePools (recommended)
Enable SpotInst by configuring the KopsControlPlane resource:
spec:
spotInst:
enabled: true
featureFlags: "Spotinst,SpotinstOcean"
- Fork the repository
- Create a feature branch
- Submit a pull request
Apache License 2.0
For issues and feature requests, please use the GitHub issue tracker.