Manager Initiated

Refer to the overview page for a background information on the manager initiated registration style.

Kubeconfig Secret

The manager initiated registration flow is accomplished by creating a Cluster resource in the Fleet Manager that refers to a Kubernetes Secret containing a valid kubeconfig file in the data field called value.

The format of this secret is intended to match the format of the kubeconfig secret used in cluster-api. This means you can use cluster-api to create a cluster that is dynamically registered with Fleet.

Example

Kubeconfig Secret

  1. kind: Secret
  2. apiVersion: v1
  3. metadata:
  4. name: my-cluster-kubeconfig
  5. namespace: clusters
  6. data:
  7. value: YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIHNlcnZlcjogaHR0cHM6Ly9leGFtcGxlLmNvbTo2NDQzCiAgbmFtZTogY2x1c3Rlcgpjb250ZXh0czoKLSBjb250ZXh0OgogICAgY2x1c3RlcjogY2x1c3RlcgogICAgdXNlcjogdXNlcgogIG5hbWU6IGRlZmF1bHQKY3VycmVudC1jb250ZXh0OiBkZWZhdWx0CmtpbmQ6IENvbmZpZwpwcmVmZXJlbmNlczoge30KdXNlcnM6Ci0gbmFtZTogdXNlcgogIHVzZXI6CiAgICB0b2tlbjogc29tZXRoaW5nCg==

Cluster

  1. apiVersion: fleet.cattle.io/v1alpha1
  2. kind: Cluster
  3. metadata:
  4. name: my-cluster
  5. namespace: clusters
  6. labels:
  7. demo: "true"
  8. env: dev
  9. spec:
  10. kubeConfigSecret: my-cluster-kubeconfig