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 thebootstrap-hub-kubeconfigsecret in theopen-cluster-management-agentnamespace after install the chart without settingbootstrapHubKubeConfig.
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 thebootstrap-hub-kubeconfigandexternalManagedKubeConfigsecrets in theklusterlet-<cluster name>namespace after install the chart without settingbootstrapHubKubeConfigandexternalManagedKubeConfig.
Uninstall the Chart
Delete the klusterlet CR.
kubectl delete klusterlet <klusterlet name>
Uninstall the Chart
helm uninstall <klusterlet name>