On OpenShift#
MTO is RedHat Certified operator available on the Red Hat MarketPlace.
This document contains instructions on installing, uninstalling and configuring Multi Tenant Operator on OpenShift.
Requirements#
- An OpenShift cluster
Installing via OperatorHub UI#
- After opening OpenShift console click on
Operators, followed byOperatorHubfrom the side menu
- Now search for
Multi Tenant Operatorand then click onMulti Tenant Operatortile
- Click on the
installbutton
- Select
Updated channel. Selectmulti-tenant-operatorto install the operator inmulti-tenant-operatornamespace fromInstalled Namespacedropdown menu. After configuringUpdate approvalclick on theinstallbutton.
Note: Use
stablechannel for seamless upgrades. ForProduction EnvironmentpreferManualapproval and useAutomaticforDevelopment Environment
- Wait for the operator to be installed
- Once successfully installed, MTO will be ready to enforce multi-tenancy in your cluster
Note: MTO will be installed in
multi-tenant-operatornamespace.
Installing via CLI OR GitOps#
- Create namespace
multi-tenant-operator
oc create namespace multi-tenant-operator
namespace/multi-tenant-operator created
- Create an OperatorGroup YAML for MTO and apply it in
multi-tenant-operatornamespace.
oc create -f - << EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: tenant-operator
namespace: multi-tenant-operator
EOF
operatorgroup.operators.coreos.com/tenant-operator created
- Create a subscription YAML for MTO and apply it in
multi-tenant-operatornamespace. To enable console set.spec.config.env[].ENABLE_CONSOLEtotrue. This will create a route resource, which can be used to access the Multi-Tenant-Operator console.
oc create -f - << EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: tenant-operator
namespace: multi-tenant-operator
spec:
channel: stable
installPlanApproval: Automatic
name: tenant-operator
source: certified-operators
sourceNamespace: openshift-marketplace
startingCSV: tenant-operator.v0.10.0
EOF
subscription.operators.coreos.com/tenant-operator created
Note: To bring MTO via GitOps, add the above files in GitOps repository.
- After creating the
subscriptioncustom resource open OpenShift console and click onOperators, followed byInstalled Operatorsfrom the side menu
- Wait for the installation to complete
- Once the installation is complete click on
Workloads, followed byPodsfrom the side menu and selectmulti-tenant-operatorproject
- Once pods are up and running, MTO will be ready to enforce multi-tenancy in your cluster
For more details and configurations check out IntegrationConfig.
Enabling Console#
To enable console GUI for MTO, go to Search -> IntegrationConfig -> tenant-operator-config and make sure the following fields are set to true:
spec:
components:
console: true
showback: true
Note: If your
InstallPlanapproval is set toManualthen you will have to manually approve theInstallPlanfor MTO console components to be installed.
Manual Approval#
- Open OpenShift console and click on
Operators, followed byInstalled Operatorsfrom the side menu.
- Now click on
Upgrade availablein front ofmto-opencostormto-prometheus.
- Now click on
Preview InstallPlanon top.
- Now click on
Approvebutton.
- Now the
InstallPlanwill be approved, and MTO console components will be installed.
Uninstall via OperatorHub UI#
You can uninstall MTO by following these steps:
-
Decide on whether you want to retain tenant namespaces and ArgoCD AppProjects or not. If yes, please set
spec.onDelete.cleanNamespacestofalsefor all those tenants whose namespaces you want to retain, andspec.onDelete.cleanAppProjecttofalsefor all those tenants whose AppProject you want to retain. For more details check out onDelete -
After making the required changes open OpenShift console and click on
Operators, followed byInstalled Operatorsfrom the side menu
- Now click on uninstall and confirm uninstall.
-
Now the operator has been uninstalled.
-
Optional:you can also manually remove MTO's CRDs and its resources from the cluster.
Notes#
- For details on licensing of MTO please refer Pricing.
- For more details on how to use MTO please refer Tenant tutorial.
- For details on how to extend your MTO manager ClusterRole please refer extend-default-clusterroles.















