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

Chat

Etcd Operator

Step 1 of 8

Creating the Custom Resource Definition (CRD)

Let's begin my 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/v1beta1
kind: CustomResourceDefinition
metadata:
  name: etcdclusters.etcd.database.coreos.com
spec:
  group: etcd.database.coreos.com
  names:
    kind: EtcdCluster
    listKind: EtcdClusterList
    plural: etcdclusters
    shortNames:
    - etcdclus
    - etcd
    singular: etcdcluster
  scope: Namespaced
  version: v1beta2
  versions:
  - name: v1beta2
    served: true
    storage: true
EOF


oc create -f etcd-operator-crd.yaml


Verify the CRD was successfully created.

oc get crd