Managing your API Connect CRs

How to update the API Connect CRs in your deployment.

Updating an API Connect CR requires editing the CR and adding, updating, or deleting individual properties or entire sections of the CR. Two methods exist to edit a CR:
  • Edit the CR manually with the kubectl edit command. The kubectl edit command opens the CR in an editor, where standard vi operations can be used to update the CR:
    kubectl edit ptl <portal cr name>
    Make the changes that you want in the CR, for example update the value of spec.databaseBackup.schedule, then save and exit.
    Note: You can omit the CR name in the edit command. To open all portal CRs in the namespace for editing, run:
    kubectl edit ptl

    For brevity, the CR name is often omitted where kubectl edit commands are provided in this documentation.

  • Use the kubectl patch operation to update the CR in a single command, for example:
    kubectl patch managementcluster <mgmt cr name> --type json -p='[{"op": "remove", "path": "/spec/multiSiteHA"}]'

    In this example, the patch operation removes the entire spec.multiSiteHA section from the management CR.

    Patch operations that require updating multiple properties in the same CR can be done by creating a YAML file that contains all the properties to change, for example:
    kubectl patch mgmt <mgmt cr name> --type merge --patch "$(cat <YAML file>)"
    where <YAML file> is the file that contains the properties to update.
    Note: With patch operations, you must always specify the CR name, even if you have only one CR of the CRD type in the namespace.
Both methods for updating CRs are used throughout this documentation.