etcd Operator design
Like most other Operators, the etcd Operator is built with CRDs as its focal interface for user interaction. Understanding the CRDs an Operator provides is a good way to get a basic understanding of how the Operator works, so that is where we will begin our examination of the etcd Operator.
CRDs
The three CRDs used by the etcd Operator are EtcdCluster
, EtcdBackup
, and EtcdRestore
. The first CRD, EtcdCluster
, controls the basic settings for the etcd installation, such as the number of Operand replicas to deploy and the version of etcd that should be installed. A sample object based on this CRD looks like the following:
simple-etcd-cr.yaml:
apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
metadata:
name: example
spec:
size: 3
version: 3.5.3
In this example, were this object to be created in a cluster (kubectl create -f simple-etcd-cr.yaml
), it would instruct the etcd Operator to create...