Before uninstalling all capabilities should be removed from all clusters. This can be done by clicking an installed capability in the clusters screen and choosing to remove the cabability.
- Uninstall in Rancher UI
- Uninstall using Helm
- Uninstall using Pulumi
Due the presence of a Kubernetes finalizer the Logging backend should be disabled before Opni is uninstalled in the central cluster. This can be done in the Opni Management UI by going to the Logging backends in the left hand navigation pane, and selecting Disable.
In the Rancher UI make sure the namespace the App is installed into is selected in the top dropdown box. Then navigate to Apps -> Installed Apps and select the installs you want to remove. Press the Delete button to remove the apps.
If you have been using persistent storage in your cluster you should PersistentVolumeClaims in the cluster as these may not be automatically cleaned up.
To uninstall Opni using Helm, run the following command:
helm -n opni uninstall opni
This will uninstall all Opni components from the main cluster.
This will not delete any persistent data stored by Cortex (e.g. in S3), or uninstall the Opni agents from downstream clusters.
Uninstall the Opni agents
On each downstream cluster, run the following command to uninstall its Opni agent:
helm -n opni-agent uninstall opni-agent
helm -n opni-agent uninstall opni-agent-crd # optional, delete crds
Persistent volumes created by Opni workloads may still remain after uninstalling the Opni helm charts.
Destroying Pulumi-managed resources
Destroying Opni infrastructure provisioned with Pulumi will delete the associated S3 bucket and all data stored in it.
The instructions below can also be found in the Pulumi web console under the "Settings" tab for your stack.
To delete all resources provisioned by Pulumi, run
pulumi destroy. This is an irreversible operation.
or by using the fully-qualified stack name:
pulumi destroy -s org-name/project-name/stack-name
Deleting the Pulumi stack
To delete the stack (and its associated configuration and history) from the Pulumi console, run
pulumi stack rm:
pulumi stack rm org-name/project-name/stack-name
To delete the stack but keep all provisioned cloud resources, use the
pulumi stack rm --force org-name/project-name/stack-name
If you lost the
Pulumi.stack-name.yaml config files for your stack, you can recreate them as follows:
echo "name: stack-name" > Pulumi.yaml
echo "runtime: go" >> Pulumi.yaml
pulumi stack select org-name/project-name/stack-name
pulumi config refresh