Difficulty: beginner
Estimated Time: 30 minutes

The etcd operator manages etcd clusters deployed to Kubernetes and automates tasks related to operating an etcd cluster.

There are more spec examples on setting up clusters with different configurations

Read Best Practices for more information on how to better use etcd operator.

Read RBAC docs for how to setup RBAC rules for etcd operator if RBAC is in place.

Read Developer Guide for setting up a development environment if you want to contribute.

See the Resources and Labels doc for an overview of the resources created by the etcd-operator.

For more information, check out the links below:

Git Hub


Etcd Operator

Step 1 of 8

Creating the Custom Resource Definition (CRD)

Let's begin by creating a new project called myproject:

oc new-project myproject

Create the Custom Resource Definition (CRD) for the Etcd Operator:

cat > etcd-operator-crd.yaml<<EOF
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
  name: etcdclusters.etcd.database.coreos.com
  group: etcd.database.coreos.com
    kind: EtcdCluster
    listKind: EtcdClusterList
    plural: etcdclusters
    - etcdclus
    - etcd
    singular: etcdcluster
  scope: Namespaced
  version: v1beta2
  - name: v1beta2
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true

oc create -f etcd-operator-crd.yaml

Verify the CRD was successfully created.

oc get crd etcdclusters.etcd.database.coreos.com