How to Restore the fleet-local namespace if it gets deleted accidently
This document (000020994) is provided subject to the disclaimer at the end of this document.
Environment
Rancher 2.x
Situation
The fleet-local namespace in the local cluster is showing a Pending state in the Rancher dashboard, or a Terminating state with kubectl.
Resolution
Prepare to clean up the related helm chart, to let Rancher reinstall it again.
Requirements:
- A kubeconfig for the Rancher (local) management cluster
- The helm CLI
If you don't have a kubeconfig for the local cluster, the steps here can be used to retrieve one from the control plane node in the cluster.
1. Check that the kubeconfig is set for the correct cluster
export KUBECONFIG=/path/to/kubeconfig.yaml
kubectl get nodes
2. Delete the fleet chart using helm
helm uninstall fleet -n cattle-fleet-system
3. Perform a rollout restart of the Rancher deployment, this will trigger the recreation of fleet-local and its associated contents
kubectl rollout restart deploy/rancher -n cattle-system
Note, this may cause a small interruption for users as the websocket tunnel to Rancher will be re-established.
4. Check the fleet/fleet-crd apps are installed and active
Status
Top Issue
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.