Issue
- We deployed a CloudBees Jenkins X Distribution cluster, we want to destroy it and install it again (re install).
- Something went wrong during the installation of the CloudBees Jenkins X Distribution cluster and I wanto to repeat the process.
Environment
Resolution
Steps
1. Select the context of the jx cluster (jx context
) you wish to delete
> jx context
? Change Kubernetes context: gke_cjxd-v2_europe-west3-c_support-cjxd-v2
Now using namespace 'jx' from context named 'gke_my-project_europe-example_jx-cluster-example' on server 'https://xx.xxx.xxx.xxx'.
2. Unistall all the componentes of the selected jx cluster (jx uninstall
).
Note: the only component app is not deleted is vault (which keeps the secrets)
> jx uninstall
? Uninstall JX - this command will remove all JX components and delete all namespaces created by Jenkins X. Do you wish to continue? Yes
? Enter the current context name to confirm uninstallation of the Jenkins X platform from the jx namespace: gke_my-project_europe-example_jx-cluster-example
Removing installation of Jenkins X in team namespace jx
service "deck" deleted
service "heapster" deleted
...
Jenkins X has been successfully uninstalled from team namespace jx
3. On the SCM side (GitHub in this case), delete all the repositories for every environment created for the cluster(usually: dev, staging and production)
4. Wipe out all the contents from ~/.jx
(files and folders)
Note: This step needs to be done any time you wish to deploy a new cluster from the same workstation, specially if they are coming from different versions of jx cli.
5. Install a new CloudBees Jenkins X Distribution cluster
Tested product/plugin versions
- CloudBees Jenkins X Distribution v2 being the output for
jx version
NAME VERSION
jx 2.0.643
Kubernetes cluster v1.12.8-gke.10
kubectl v1.15.0
git 2.7.4
Operating System Ubuntu 16.04.6 LTS
0 Comments