This charm deploys and manages the rancher-integration application capable of registering (and if needed unregistering) the Kubernetes cluster hosting the charm within an existing Rancher container management platform.
As a result of the cluster import process, the Rancher platform generates an import manifest which is fetched and stored by the rancher-integrator application.
To finalize the registration process, the sidecar charm will retrieve the import manifest and apply it on the Kubernetes cluster hosting the charm.
Charmhub: Deploy Rancher Integrator using Charmhub - The Open Operator Collection
Documentation: Rancher Integrator docs - index
Bugs / Issues: https://github.com/baycarbone/charm-rancher-integrator/issues
More information regarding the rancher-interator application can be found at rancher-integrator repository.
More information about the cluster registration process can be found at
cluster registration doc.
High level operation
- sidecar operator requests registration to the rancher-integrator workload providing the required connection details.
- rancher-integrator registers on the Rancher platform
- rancher-integrator retrieves import manifest
- sidecar operator retrieves import manifest from rancher-intergrator
- sidecar operator applies the manifest on its Kubernetes cluster
Assuming you have juju installed and bootstrapped on a Kubernetes cluster, deploy the charm and execute the required actions as needed (if you do not, please refer to setup).
In order to execute the actions the following config options need to be set:
url: url of the existing Rancher platform against which registration will be performed.
bearer-token: bearer-token needed to access the Rancher api. For more information on retrieving such a token, please see rancher-api-keys.
(optional) cert-verify: toggles verification of the Rancher platform certificate. Setting this to ‘False’ is not recommended but can be useful for development purposes when using a self-signed certificate.
# Deploy the rancher-integrator charm $ juju deploy rancher-integrator --channel beta \ --config url="cluster.test" \ --config bearer-token="token-abcde:abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab" # Elavate permisions in order for the charm to communicate with the Kubernetes API $ juju trust rancher-integrator --scope=cluster # Wait for the deployment to complete. The rancher-integrator unit should be in 'active idle' state and its message should inform you that the cluster is currently not registered. $ watch -n1 --color juju status --color # Execute the registration action using actions-v2 for a better UX export JUJU_FEATURES=actions-v2 $ juju run rancher-integrator/0 register --format=yaml
Request the rancher-integration application to register the Kubernetes cluster, then retrieve the import manifest and apply it on the Kubernetes cluster hosting the charm.
The register action takes an optional
nameparameter when a user defined cluster name within the Rancher platform is desired. If this parameter is not set, a randomly generated cluster name will be assigned and returned to the user.
Request the rancher-integration application to unregister the Kubernetes cluster, then delete the import manifest from the Kubernetes cluster hosting the charm.