Chapter 3. User tasks
3.1. Creating applications from installed Operators Copy linkLink copied to clipboard!
You can deploy applications on your OpenShift Dedicated cluster from Operators that a cluster administrator installed. Use the Installed Operators page in the web console to create an application from an Operator custom resource (CR) API, such as an etcd cluster.
3.1.1. Creating an etcd cluster using an Operator Copy linkLink copied to clipboard!
You can create an etcd cluster using the etcd Operator in the OpenShift Dedicated web console. The Operator creates the pods, services, and other cluster resources for you.
Prerequisites
- Access to a OpenShift Dedicated cluster.
- The etcd Operator already installed cluster-wide by an administrator.
Procedure
-
Create a new project in the OpenShift Dedicated web console for this procedure. This example uses a project called
my-etcd. Navigate to the Ecosystem
Installed Operators page. The Operators installed on the cluster by the dedicated-admin and available for use are shown here as a list of cluster service versions (CSVs). Each CSV launches and manages the software provided by the Operator.
TipYou can get this list from the CLI by running the following command:
$ oc get csvOn the Installed Operators page, click the etcd Operator to view more details and available actions.
As shown under Provided APIs, this Operator makes available three new resource types, including one for an etcd Cluster, the
EtcdClusterresource.These objects work similarly to the built-in native Kubernetes ones, such as
DeploymentorReplicaSet, but contain logic specific to managing etcd.Create a new etcd cluster:
- In the etcd Cluster API box, click Create instance.
-
Optional: Modify the minimal starting template of an
EtcdClusterobject, such as the size of the cluster. - Click Create to finalize. This triggers the Operator to start up the pods, services, and other components of the new etcd cluster.
- Click the example etcd cluster.
Click the Resources tab.
Your project contains several resources that the Operator created and configured.
- Verify that a Kubernetes service exists that allows you to access the database from other pods in your project.
Optional: To grant another user permission to create Operator-managed applications in the project, add the
editrole by running the following command:$ oc policy add-role-to-user edit <user> -n <target_project>Users with the
editrole in a project can create, manage, and delete Operator-managed application instances, such as an etcd cluster.
Results
You have an etcd cluster that reacts to failures and rebalances data as pods become unhealthy or migrate between nodes in the cluster. dedicated-admins or developers with proper access can use the database with their applications.