Running the Mendix Operator in Global Mode
Introduction
When running the Mendix Operator in Global mode, one installation of the Mendix Operator and Agent is sufficient to manage applications across multiple namespaces. This Operator mode is recommended for new customers, or customers that want to streamline and simplify their deployments and operations. For existing customers, and for use cases that require having a separate Operator instance for every namespace, the Standard mode is still available and supported.
Global Operator installation is supported officially from Operator version v2.20.0 and above.
Installing the Global Operator
While installing the Mendix Operator in Global mode, you must first deploy the Mendix Operator and Agent within the Global Operator namespace. A Global Operator namespace comprises the Operator itself, the Agent, and the configuration that instructs the Operator on the namespaces it should oversee.
After configuring the Global Operator namespace, you must configure the managed namespaces, that is, namespace-specific configuration settings. This may include setting up storage plans, ingress configurations, registry settings, proxy, or custom TLS, all of which are tailored to the specific requirements of the managed namespace. The post-installation configuration process also includes creating an application within the managed namespace.
To install and configure the Global Operator, perform the following steps:
-
In the Private Cloud Portal, create a cluster and select Global Installation as the Installation Type.
-
Provide the Cluster Name, Cluster Type and Description.
-
Click Create.
-
After the Global Operator cluster is created, click Add Global Operator Main Namespace.
Ensure that you do not use a namespace that is intended to be a managed namespace, that is, a namespace where you plan to deploy a Mendix app. The Global Operator main namespace must be separate from managed namespaces, otherwise you may encounter unexpected results. -
Provide the Global Operator Namespace name, select the Installation type, and then click Done.
-
Select the Operating system and install the Mendix Operator and Mendix Agent by performing the following steps:
- You can apply the custom TLS and proxy settings in the Global Operator main namespace by just selecting only the Custom TLS and Proxy options in the Configuration Tool.
Base installation can only be performed on the Global Operator main namespace. Along with base installation, you can also apply custom TLS and proxy settings. However, other configurations such as storage plan, database plan, ingress configuration, or registry configuration are not supported in Global Operator main namespace. -
Verify that the installation was successful by using the following command:
kubectl -n {globalOperatorNamespace} get deployments
-
Verify that the status of the Operator and Agent pod is Running by using the following command:
kubectl -n {globalOperatorNamespace} get pods
-
In the Private Cloud Portal, verify that the status of the Global Operator main namespace is Connected, as in the following figure:
-
Click Namespaces to go to the Namespaces Overview page.
-
Once the Global Operator main namespace is connected, the Convert Namespace and Add Managed Namespace buttons are enabled and you can install the managed namespace under the Global Operator namespace by clicking Add Managed Namespace.
Ensure that you use the same name for the managed namespace in the Portal and in the cluster while running the command. Using different names may result in unwanted issues. -
Provide the managed namespace name under which you want to deploy the mendix application and click Done.
Ensure that you do not use the name of a main namespace -
On the Configuration page, select the Operating system and run the Configuration command under the Configuration section.
Ensure that you do not use a namespace that is already used as a Global Operator main namespace. The Global Operator namespace must be separate from managed namespaces, otherwise you may encounter unexpected results.Ensure that you do not perform base installation on the Global Operator managed namespace. -
Click Configure Namespace. Under Global Operator section in the cli, provide the main namespace name and select the resources which need to be configured in the managed namespace. Follow Configure the namespace for more information. Once the information is provided, under Review and Apply section, click Apply Configuration
Results
After you configure the managed namespace, the Agent and Operator pod are restarted automatically, so that the Global Operator namespace can process the newly added managed namespace. The managed namespace is added to the Operator configuration for the Global Operator namespace, and the required storage plans are created in the managed namespace.
The Operator configuration for the managed namespace is created as well.
After configuration, the status of managed namespace changes to Configured.
Once the managed namespace is configured, you can find the list with all the namespaces managed by the globally installed operator in Additional Information section of the main namespace. The list is displayed in the Global Installation Managed Namespaces section.
If you delete the managed namespaces from the portal, they are not deleted from the cluster. You must delete them from the cluster manually. You must also remove the managed namespace from the list of managed namespaces in the Operator configuration of the main namespace.
The main namespace cannot be deleted from the portal until the managed namespaces are deleted from the cluster.
Next Steps
After everything is configured, you can deploy the application. For more information, see Deploy Application. The application is deployed within the managed namespace.
Convert Namespace from Standard to Global Operator
You can convert a namespace which currently uses the standard operator to be a Global Operator managed namespace by completing the following steps.
-
On the Cluster Overview page, click Convert Namespace.
-
Choose the namespace you want to convert to a managed namespace. The displayed namespaces match the Cluster type of the Global Operator Cluster. If your namespace is not listed, click here at the bottom of the page to expand the list.
-
After selecting the namespace, click Next. You will be redirected to a page with the command needed to convert the standard namespace to a global operator managed namespace.
-
Run the command and make sure that you are logged in to the cluster where the conversion must be done.
Once the command has been run successfully, your namespace will be converted to managed namespace as part of Global Operator installation on the cluster side.
If the conversion command is not run and the Next button is clicked directly, an error message will be displayed because the presence of the standard namespace could not be verified in the list of managed namespaces.
The namespace to be converted must be in the same cluster as the main namespace. Additionally, ensure that both namespaces have the same operator version; otherwise, the conversion will not be performed. -
Once the conversion command runs successfully, click Next to be redirected to the Conversion Summary pop-up page, which will confirm the successful conversion. This step will also ensure that the namespace conversion is visible on the portal side as well.
-
Click Done to return to the Namespaces Overview page.
Licensing
Installing Private Cloud License Manager
Configure Private Cloud License Management (PCLM) in the Global Operator namespace. For more information, see Private Cloud License Manager.
Licenses imported in the PCLM Server appear in the PCLM Statistics section of the Global Operator main namespace. You can see both Runtime and Operator license.
Claimed licenses are visible in the PCLM Statistics section of the Managed namespace.
Upgrading Managed Namespaces
When you upgrade the Global Operator main namespace, the managed namespaces within the global operator namespace are also automatically upgraded.