Launch an etcd Operator

Length: 00:06:05

Lesson Summary:

Launch an etcd Operator

Operators take the pressure off of systems administrators by ensuring that pods remain at a consistent count, replacing any deleted, destroyed, or damaged pods automatically. Launch an etcd operator using the template below, or by using the templates under the `content-deploy-an-operator/etcd-operator Github.

create etcd subscription named etcd-alpha-subscription.yaml:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd
  namespace: myproject 
spec:
  channel: alpha
  name: etcd
  source: rh-operators
  installPlanApproval: Manual

Approving the InstallPlan

Modify the InstallPlan and set approved to true.

$ oc edit InstallPlan

Once the InstallPlan is set to true, you will see the newly provisioned ClusterServiceVersion, ClusterResourceDefinition, Role and RoleBindings, Service Accounts, and etcd-operator Deployment.

oc get clusterserviceversion
oc get crd
oc get sa
oc get roles
oc get rolebindings
oc get deployments

Creating the Custom Resource

Create the etcd-cluster.yaml Cluster manifest.

apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
metadata:
  name: example-etcd-cluster
spec:
  size: 3
EOF

Create the etcd-cluster.

oc create -f etcd-cluster.yaml

Confirm the cluster has been created:

$ oc get etcdcluster
$ oc get pods


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More