I am trying to add a k3s cluster (needed for Fleet, as far as I have seen) to a Fleet manager/controller in another cluster at another network location. Everytime I follow the instructions from https://github.com/rancher/fleet I get the following error:
kubectl logs -f fleet-agent-548bf5f99-dbr5t -n fleet-system
E0512 11:01:49.740133 1 memcache.go:189] couldn't get current server API group list: the server has asked for the client to provide credentials
panic: the server has asked for the client to provide credentials
goroutine 1 [running]:
github.com/rancher/fleet/vendor/k8s.io/apimachinery/pkg/util/runtime.Must(...)
/go/src/github.com/rancher/fleet/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:171
github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1.NewClusterRegistrationRequestController(0x1ac682f, 0xf, 0x1abe36c, 0x8, 0x1ad5b25, 0x1a, 0x1ad7caf, 0x1b, 0x1d66c60, 0xc0007822a0, ...)
/go/src/github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistrationrequest.go:88 +0x1f9
github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1.(*version).ClusterRegistrationRequest(0xc000350080, 0x1d952a0, 0xc000350080)
/go/src/github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1/interface.go:68 +0x74
github.com/rancher/fleet/modules/agent/pkg/register.createClusterSecret(0x1d7e7a0, 0xc00077e640, 0xc00090b230, 0x24, 0x1da2080, 0xc0002e56a0, 0xc000776280, 0x0, 0x0, 0x0)
/go/src/github.com/rancher/fleet/modules/agent/pkg/register/register.go:119 +0x3ab
github.com/rancher/fleet/modules/agent/pkg/register.tryRegister(0x1d7e7a0, 0xc00077e640, 0xc00004200a, 0xc, 0x0, 0x0, 0xc0007ae200, 0x0, 0xc0006af5a0, 0x1247b5a, ...)
/go/src/github.com/rancher/fleet/modules/agent/pkg/register/register.go:65 +0x3e6
github.com/rancher/fleet/modules/agent/pkg/register.Register(0x1d7e7a0, 0xc00077e640, 0xc00004200a, 0xc, 0x0, 0x0, 0xc0007ae200, 0x0, 0xc0006af668, 0xc0006af6d0, ...)
/go/src/github.com/rancher/fleet/modules/agent/pkg/register/register.go:36 +0x8e
github.com/rancher/fleet/modules/agent/pkg/agent.Start(0x1d7e7a0, 0xc00077e640, 0x0, 0x0, 0xc00004200a, 0xc, 0xc0009136b0, 0xc000788490, 0x0)
/go/src/github.com/rancher/fleet/modules/agent/pkg/agent/app.go:45 +0x128
main.(*FleetAgent).Run(0xc000503d40, 0xc0001b0dc0, 0x2be89d8, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/rancher/fleet/cmd/fleetagent/main.go:21 +0x80
github.com/rancher/fleet/modules/cli/pkg/command.bind.func1(0xc0001b0dc0, 0x2be89d8, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/rancher/fleet/modules/cli/pkg/command/builder.go:246 +0x113
github.com/rancher/fleet/vendor/github.com/spf13/cobra.(*Command).execute(0xc0001b0dc0, 0xc00003a1e0, 0x0, 0x0, 0xc0001b0dc0, 0xc00003a1e0)
/go/src/github.com/rancher/fleet/vendor/github.com/spf13/cobra/command.go:838 +0x460
github.com/rancher/fleet/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0001b0dc0, 0xc000044018, 0x1d7e7a0, 0xc00077e640)
/go/src/github.com/rancher/fleet/vendor/github.com/spf13/cobra/command.go:943 +0x317
github.com/rancher/fleet/vendor/github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/rancher/fleet/vendor/github.com/spf13/cobra/command.go:883
github.com/rancher/fleet/vendor/github.com/spf13/cobra.(*Command).ExecuteContext(...)
/go/src/github.com/rancher/fleet/vendor/github.com/spf13/cobra/command.go:876
github.com/rancher/fleet/modules/cli/pkg/command.Main(0xc0001b0dc0)
/go/src/github.com/rancher/fleet/modules/cli/pkg/command/builder.go:74 +0x6d
main.main()
/go/src/github.com/rancher/fleet/cmd/fleetagent/main.go:32 +0x1b2
Not sure what the issue is.
Would appreciate any help on this topic.