You can deploy etcd on the kubernet using the operator (from extensions/v1beta1 ) and quay.io/coreos/etcd-operator .
An example deployment with cluster size 3 is as follows:
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: etcd-operator spec: replicas: 1 template: metadata: name: etcd-operator labels: app: etcd component: operator spec: containers: - name: etcd-operator image: quay.io/coreos/etcd-operator:v0.3.0 env: - name: MY_POD_NAMESPACE valueFrom: { fieldRef: { fieldPath: metadata.namespace } } - name: MY_POD_NAME valueFrom: { fieldRef: { fieldPath: metadata.name } } --- apiVersion: etcd.coreos.com/v1beta1 kind: Cluster metadata: name: etcd-cluster labels: app: etcd component: cluster spec: size: 3 version: "3.1.8"
Pay attention to the beta status of this project. However, according to the attendants, the operator is now stable . I successfully deployed the configuration above, but I did not run it during production.
The operator code is available on github . You can find additional documentation here.
Friedrich große
source share