Overview
The cpln operator command manages the Kubernetes secret required for Control Plane integration. This command provides two subcommands:- install: Creates a Kubernetes secret which grants the Control Plane operator access to one of your orgs.
- uninstall: Removes the operator-installed secret from your cluster.
If a secret with the organization name already exists and was not installed by the operator, the installation will fail to prevent
conflicts.
Prerequisites
- CLI installed.
- Access to a Kubernetes cluster with permissions to create namespaces and secrets.
operator install
Creates a Kubernetes secret which grants the Control Plane operator access to one of your orgs.Options
Required
--serviceaccount, -s- The Control Plane service account name for the operator. If it does not exist, a new one will be created.
Optional
--serviceaccount-group, -g- The group to assign to the specified service account. Defaults to
"superusers".
- The group to assign to the specified service account. Defaults to
--export- Export the Kubernetes resources to a stdout instead of applying them directly to the cluster.
Usage Example
To install the Kubernetes operator and create the necessary service account and secret, run:- Check if
my-operator-saexists; If not, create it. - Assign the service account to the
superusersgroup. - Generate a key for the service account and create a Kubernetes secret named
demo-orgin thecontrolplanenamespace. - Abort if a conflicting secret (not installed by the operator) already exists.
Exporting Kubernetes Resources
If you prefer to export the operator’s Kubernetes resource definitions without applying them immediately, use:operator uninstall
Removes the operator-installed secret from your cluster.Usage Example
To uninstall the operator and remove its secret from your cluster, run:controlplane namespace and deletes it. If the secret is not found, the command exits with code 0.