Files
open-cluster-management/deploy/klusterlet/chart/klusterlet
2024-07-10 15:24:10 +00:00
..
2024-07-10 15:24:10 +00:00
2024-07-10 15:24:10 +00:00
2024-07-10 15:24:10 +00:00
2024-07-10 15:24:10 +00:00
2024-07-10 15:24:10 +00:00

klusterlet

The klusterlet provides the registration to the Hub clusters as a managed cluster. This operator supports the installation and upgrade of klusterlet.

Prerequisites

You need a Hub cluster which has installed clusterManager operator.

Get Repo Info

helm repo add ocm https://open-cluster-management.io/helm-charts
helm repo update
helm search repo ocm

Install the Chart

Run klusterlet on Default mode.

Install the Chart on the managed cluster:

helm install klusterlet --version <version> ocm/klusterlet \
    --set klusterlet.clusterName=<cluster name> \
    --set-file bootstrapHubKubeConfig=<the bootstrap kubeconfig file of hub cluster> \
    --namespace=open-cluster-management \
    --create-namespace

When the klusterlet is installed on the hub cluster.

helm install klusterlet --version <version> ocm/klusterlet \
    --set klusterlet.clusterName=<cluster name> \
    --set-file bootstrapHubKubeConfig=<the bootstrap kubeconfig file of hub cluster> \
    --namespace=open-cluster-management

Note: If the cluster is KinD cluster, the kubeconfig should be internal:: kind get kubeconfig --name managed --internal. You can create the bootstrap-hub-kubeconfig secret in the open-cluster-management-agent namespace after install the chart without setting bootstrapHubKubeConfig.

Run klusterlet on Hosted mode.

Install the Chart on the hosting cluster without installing operator:

helm install <klusterlet name> --version <version> ocm/klusterlet \
    --set klusterlet.clusterName=<cluster name>,klusterlet.mode=Hosted,noOperator=true \
    --set-file bootstrapHubKubeConfig=<the bootstrap kubeconfig file of hub cluster>,\
      externalManagedKubeConfig=<the kubeconfig file of the managed cluster>

Install the Chart on the hosting cluster with installing operator:

helm install <klusterlet name> --version <version> ocm/klusterlet \
    --set klusterlet.clusterName=<cluster name>,klusterlet.mode=Hosted \
    --set-file bootstrapHubKubeConfig=<the bootstrap kubeconfig file of hub cluster>,\
      externalManagedKubeConfig=<the kubeconfig file of the managed cluster>

Note: If the cluster is KinD cluster, the kubeconfig should be internal:: kind get kubeconfig --name managed --internal. You can create the bootstrap-hub-kubeconfig and externalManagedKubeConfig secrets in the klusterlet-<cluster name> namespace after install the chart without setting bootstrapHubKubeConfig and externalManagedKubeConfig.

Uninstall the Chart

Delete the klusterlet CR.

kubectl delete klusterlet <klusterlet name>

Uninstall the Chart

helm uninstall <klusterlet name>