CoreOS etcd-operator

etcd-operator Simplify etcd cluster configuration and management.

DISCLAIMER: While this chart has been well-tested, the etcd-operator is still currently in beta. Current project status is available here.

Introduction

This chart bootstraps an etcd-operator and allows the deployment of etcd-cluster(s).

Official Documentation

Official project documentation found here

Prerequisites

  • Kubernetes 1.4+ with Beta APIs enabled
  • Suggested: PV provisioner support in the underlying infrastructure to support backups

Installing the Chart

To install the chart with the release name my-release:

$ helm install stable/etcd-operator --name my-release

Note: If you set cluster.enabled on install, it will have no effect. Before you create an etcd cluster, the TPR must be installed by the operator, so this option is ignored during helm installs, but can be used in upgrades.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components EXCEPT the persistent volume.

Updating

Updating the TPR resource will not result in the cluster being update until kubectl apply for TPRs is fixed see kubernetes/issues/29542 Work around options are documented here

Configuration

The following table lists the configurable parameters of the etcd-operator chart and their default values.

ParameterDescriptionDefault
rbac.createinstall required RBAC service account, roles and rolebindingstrue
rbac.apiVersionRBAC api version `v1alpha1v1beta1`
rbac.etcdOperatorServiceAccountNameName of the service account resource when RBAC is enabledetcd-operator-sa
rbac.backupOperatorServiceAccountNameName of the service account resource when RBAC is enabledetcd-backup-operator-sa
rbac.restoreOperatorServiceAccountNameName of the service account resource when RBAC is enabledetcd-restore-operator-sa
deployments.etcdOperatorDeploy the etcd cluster operatortrue
deployments.backupOperatorDeploy the etcd backup operatortrue
deployments.restoreOperatorDeploy the etcd restore operatortrue
customResources.createEtcdClusterCRDCreate a custom resource: EtcdClusterfalse
customResources.createBackupCRDCreate an a custom resource: EtcdBackupfalse
customResources.createRestoreCRDCreate an a custom resource: EtcdRestorefalse
etcdOperator.nameEtcd Operator nameetcd-operator
etcdOperator.replicaCountNumber of operator replicas to create (only 1 is supported)1
etcdOperator.image.repositoryetcd-operator container imagequay.io/coreos/etcd-operator
etcdOperator.image.tagetcd-operator container image tagv0.7.0
etcdOperator.image.pullpolicyetcd-operator container image pull policyAlways
etcdOperator.resources.cpuCPU limit per etcd-operator pod100m
etcdOperator.resources.memoryMemory limit per etcd-operator pod128Mi
etcdOperator.nodeSelectorNode labels for etcd operator pod assignment{}
etcdOperator.commandArgsAdditional command arguments{}
backupOperator.nameBackup operator nameetcd-backup-operator
backupOperator.replicaCountNumber of operator replicas to create (only 1 is supported)1
backupOperator.image.repositoryOperator container imagequay.io/coreos/etcd-operator
backupOperator.image.tagOperator container image tagv0.7.0
backupOperator.image.pullpolicyOperator container image pull policyAlways
backupOperator.resources.cpuCPU limit per etcd-operator pod100m
backupOperator.resources.memoryMemory limit per etcd-operator pod128Mi
backupOperator.spec.storageTypeStorage to use for backup file, currently only S3 supportedS3
backupOperator.spec.s3.s3BucketBucket in S3 to store backup file
backupOperator.spec.s3.awsSecretName of kubernetes secret containing aws credentials
backupOperator.nodeSelectorNode labels for etcd operator pod assignment{}
backupOperator.commandArgsAdditional command arguments{}
restoreOperator.nameRestore operator nameetcd-backup-operator
restoreOperator.replicaCountNumber of operator replicas to create (only 1 is supported)1
restoreOperator.image.repositoryOperator container imagequay.io/coreos/etcd-operator
restoreOperator.image.tagOperator container image tagv0.7.0
restoreOperator.image.pullpolicyOperator container image pull policyAlways
restoreOperator.resources.cpuCPU limit per etcd-operator pod100m
restoreOperator.resources.memoryMemory limit per etcd-operator pod128Mi
restoreOperator.spec.s3.pathPath in S3 bucket containing the backup file
restoreOperator.spec.s3.awsSecretName of kubernetes secret containing aws credentials
restoreOperator.nodeSelectorNode labels for etcd operator pod assignment{}
restoreOperator.commandArgsAdditional command arguments{}
etcdCluster.nameetcd cluster nameetcd-cluster
etcdCluster.sizeetcd cluster size3
etcdCluster.versionetcd cluster version3.2.10
etcdCluster.image.repositoryetcd container imagequay.io/coreos/etcd-operator
etcdCluster.image.tagetcd container image tagv3.2.10
etcdCluster.image.pullPolicyetcd container image pull policyAlways
etcdCluster.enableTLSEnable use of TLSfalse
etcdCluster.tls.static.member.peerSecretKubernetes secret containing TLS peer certsetcd-peer-tls
etcdCluster.tls.static.member.serverSecretKubernetes secret containing TLS server certsetcd-server-tls
etcdCluster.tls.static.operatorSecretKubernetes secret containing TLS client certsetcd-client-tls
etcdCluster.pod.antiAffinityWhether etcd cluster pods should have an antiAffinityfalse
etcdCluster.pod.resources.limits.cpuCPU limit per etcd cluster pod100m
etcdCluster.pod.resources.limits.memoryMemory limit per etcd cluster pod128Mi
etcdCluster.pod.resources.requests.cpuCPU request per etcd cluster pod100m
etcdCluster.pod.resources.requests.memoryMemory request per etcd cluster pod128Mi
etcdCluster.pod.nodeSelectornode labels for etcd cluster pod assignment{}

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:

$ helm install --name my-release --set image.tag=v0.2.1 stable/etcd-operator

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

$ helm install --name my-release --values values.yaml stable/etcd-operator

RBAC

By default the chart will install the recommended RBAC roles and rolebindings.

To determine if your cluster supports this running the following:

$ kubectl api-versions | grep rbac

You also need to have the following parameter on the api server. See the following document for how to enable RBAC

--authorization-mode=RBAC

If the output contains “beta” or both “alpha” and “beta” you can may install rbac by default, if not, you may turn RBAC off as described below.

RBAC role/rolebinding creation

RBAC resources are enabled by default. To disable RBAC do the following:

$ helm install --name my-release stable/etcd-operator --set rbac.create=false

Changing RBAC manifest apiVersion

By default the RBAC resources are generated with the “v1beta1” apiVersion. To use “v1alpha1” do the following:

$ helm install --name my-release stable/etcd-operator --set rbac.install=true,rbac.apiVersion=v1alpha1