klusterlet
The Klusterlet provides the registration to the Hub clusters as a managed cluster. This operator supports the installation and upgrade of Klusterlet.
About this chart
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:
helm install <klusterlet release name> --version <version> ocm/klusterlet \
--set klusterlet.name=<klusterlet name>,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>
Run klusterlet without operator
In this case, the klusterlet operator has been installed on the cluster.
helm install <klusterlet release name> --version <version> ocm/klusterlet \
--set klusterlet.name=<klusterlet name>,klusterlet.clusterName=<cluster name>,klusterlet.namespace=<klusterlet namespace>,noOperator=true \
--set-file bootstrapHubKubeConfig=<the bootstrap kubeconfig file of hub 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
Delete the klusterlet CR
kubectl delete klusterlet <klusterlet name>
Uninstall the Chart
helm uninstall klusterlet --namespace=open-cluster-management
Deploy klusterlet with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has klusterlet on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartklusterlet is pinned at v1.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply