Operator Lifecycle Manager

Operator Lifecycle Manager

Clone the official Operator Lifecycle Manager repository.

git clone https://github.com/operator-framework/operator-lifecycle-manager

Install Operator Lifecycle Manager v0.7.2. You may need to run this twice to ensure everything was properly created:

oc create -f operator-lifecycle-manager/deploy/okd/manifests/0.7.2/

Verify the new openshift-operator-lifecycle-manager namespace has been created along with the three OLM operators: catalog, olm, and package.

oc get pods --all-namespaces

The local console proxy utilizes the system:serviceaccount:kube-system:default Service Account to access all resources. Grant this Service Account cluster-admin access and refresh the UI.

oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:default

Serve up the Operator-centric OpenShift UI console locally.


You should be able to acces the UI at http://localhost:9000.

Create a subscription manifest for the etcd-operator. Ensure the Approval is set to Manual.

cat > etcd-alpha-subscription.yaml <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
  name: etcd
  namespace: myproject 
  channel: alpha
  name: etcd
  source: rh-operators
  installPlanApproval: Manual

Create the Subscription.

oc create -f etcd-alpha-subscription.yaml

Verify the Subscription and InstallPlan have been created.

oc get subscription
oc get 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

Create the etcdCluster manifest.

cat > etcd-cluster.yaml <<EOF
apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
  name: example-etcd-cluster
  size: 3

Create the etcd-cluster.

oc create -f etcd-cluster.yaml