Fleet agent fails to start with error secret fleet-agent not found
Article Number: 000021723
Environment
Rancher 2.8, 2.9
Situation
After Rancher upgrade, the fleet agent fails to start with the following error messages:
leaderelection.go:248] attempting to acquire leader lease cattle-fleet-system/fleet-agent-lock...
leaderelection.go:258] successfully acquired lease cattle-fleet-system/fleet-agent-lock
time="2024-03-21T16:02:37Z" level=warning msg="Cannot find fleet-agent secret, running registration"
panic: assignment to entry in nil map
(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985\ngithub.com/spf13/cobra.
(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\ngithub.com/spf13/cobra.
Resolution
In the Rancher UI:
- Click ☰ > Continuous Delivery.
-
Select your namespace at the top of the menu, noting the following:
-
By default, fleet-default is selected which includes all downstream clusters that are registered through Rancher.
- You may switch to fleet-local, which only contains the local cluster, or you may create your own workspace to which you may assign and move clusters.
- Click on Clusters on the left navigation bar and Force Update