Core Tasks

Configuring and installing operators with OLM

Packaging an operator for OLM

OLM requires you to provide metadata about your operator, so that the operator’s lifecycle can be managed safely on a cluster. This section introduces you to the process of packaging the metadata in a format that is compatible with OLM.
This is very similar to packaging software for a traditional operating system - think of the packaging step for OLM as the stage at which you make your rpm, dep, or apk bundle.

Validating your package

Once you’ve created your operator’s package manifests, you will want to ensure that your package is valid and in the correct format.

Making your operator part of a catalog

Once you’ve packaged your operator for OLM, you can make it a part of a catalog, which is then queried to list the operators available to be installed with OLM in the cluster.

List operators available to install

Once you’ve packaged your operator and made it part of catalog, you can see it among the list of operators that are available to install in the cluster. There is an extension API in OLM named PackageManifest that contains information about existing CatalogSources, which is essentially a collection of bundles that each define an operator in the cluster. By querying that API, you can see the list of available operators.

Install your operator with OLM

Once you’ve made your operator available in a catalog, or you’ve chosen an operator from the list of operators available to be installed in the cluster, you can install your operator by creating a Subscription to a specific channel.

Uninstall your operator

When uninstalling an operator managed by OLM, a Cluster Admin must decide whether or not to remove the CustomResourceDefinitions (CRD), APIServices, and resources related to these types owned by the operator. By design, when OLM uninstalls an operator it does not remove any of the operator’s owned CRDs, APIServices, or CRs in order to prevent data loss. Instead, it is left to the Cluster Admin to remove any unwanted types and resources from the cluster. This document will discuss the steps a Cluster Admin should take when uninstalling an operator.

Uninstall OLM

The process of uninstalling OLM is symmertic to the process of intalling it. Specifically all OLM specific CRDs and the OLM deployment need to be deleted. The apiservices should be removed as the first step, preventing it from becoming a dangling resource.

Note that uninstalling OLM does not necessarily clean up the operators installed with it. Please clean up installed operator resources before uninstalling OLM, especially for resources that do not have an owner reference.

Troubleshooting

Tips and tricks for troubleshooting unexpected behavior when installing and managing operators with OLM.

Last modified June 30, 2020: Reorganise navigation for site (826b54b)