Uninstalling the platform

Removing a permanent management cluster using kubeconfig and a temporary bootstrap cluster.

Starting from release 2.12, the Shturval platform can be removed using the shtil utility. The command removes the permanent management cluster and uses a temporary bootstrap cluster.

Before you start

Before removing the platform, check the restrictions and prepare the data:

  • Removal is only available with the static management cluster kubeconfig that was issued for download after installation. In the GUI, it can be found in the namespace of the management cluster, in Secret with the name clustername-kubeconfig.
  • Removing a permanent management cluster is performed with a temporary bootstrap cluster. If the temporary cluster is deleted or unavailable, pass the license with the --license parameter so shtil can start the temporary cluster in an open loop environment. In a closed loop environment, also specify the registry address with the --registry parameter.
  • The Docker container with a temporary cluster on the machine from which removal is launched must be running correctly and not suspended. Two Docker containers of a temporary cluster cannot run at the same time.
  • During removal, shtil will ask for confirmation: you will need to enter the name of the management cluster.
  • You cannot delete the platform if client clusters are deployed and running on it.

If the shtil file is not yet executable, run:

chmod +x ./shtil

Before deleting, save user.conf, kubeconfig, and other data that may be needed to access the management GUI or diagnostics.

Delete command

To remove the platform, run the delete management command and substitute your parameter values:

./shtil delete management --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER

Available options:

ParameterRequiredDescription
--bootstrap-kubeconfigNoPath to kubeconfig of the temporary management cluster. Specify if the temporary cluster kubeconfig is not located at the default path ($HOME/.shturval/shturval-bootstrap)
--help, -hNoShow help for the delete cluster command
--kubeconfigYesPath to kubeconfig of the permanent management cluster
--licenseNoShturval platform license. Specify if there is no temporary cluster and you need to start it before deletion. If the license contains special characters ($, <, >, *, &, ?, /, \), wrap it in single quotes
--registryNoImage registry address. Default r.shturval.tech
--retryNoNumber of retries for unsuccessful operations. Default 10
--verbosity, -vNoLog detail level. Default 0
--insecureNoSkip TLS verification when connecting to the registry. Default false

Open loop examples

Remove the platform if a temporary cluster exists and kubeconfig is at the default path:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER

Remove the platform with increased log detail:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER \
  --verbosity=3 \
  --retry=50

Remove the platform if the temporary cluster kubeconfig is not at the default path:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER \
  --bootstrap-kubeconfig=PATH-TO-KUBECONFIG-TEMPORARY-CLUSTER

Remove the platform if there is no temporary cluster:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER \
  --license='YOUR-LICENSE'

Closed loop examples

Remove the platform if a temporary cluster exists, its kubeconfig is not at the default path, and images are available in the local registry:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER \
  --bootstrap-kubeconfig=PATH-TO-KUBECONFIG-TEMPORARY-CLUSTER \
  --registry=YOUR-REGISTRY-ADDRESS

If the registry has a self-signed certificate, add the registry to the container runtime configuration and, if necessary, skip TLS verification with --insecure=true.

Remove the platform in a closed loop without TLS verification for the registry:

./shtil delete management \
  --kubeconfig=PATH-TO-KUBECONFIG-PERSISTENT-CLUSTER \
  --registry=YOUR-REGISTRY-ADDRESS \
  --insecure=true

For Podman, the default registry configuration file is at /etc/containers/registries.conf; for Docker — /etc/docker/daemon.json.

Example registries.conf:

[registries.search]
registries = ['docker.io', 'registry.fedoraproject.org', 'registry.access.redhat.com']

[registries.insecure]
registries = ['YOUR-REGISTRY-ADDRESS']

[registries.block]
registries = []

Example daemon.json:

{
  "insecure-registries": ["YOUR-REGISTRY-ADDRESS"]
}