Installation from Source
This document describes how you can use the hack/remote-up-karmada.sh
script to install Karmada on
your clusters based on the codebase.
Select a way to expose karmada-apiserverโ
The hack/remote-up-karmada.sh
will install karmada-apiserver
and provide two ways to expose the server:
1. expose by HostNetwork
typeโ
By default, the hack/remote-up-karmada.sh
will expose karmada-apiserver
by HostNetwork
.
No extra operations are needed with this type.
2. expose by service with LoadBalancer
typeโ
If you don't want to use the HostNetwork
, you can ask hack/remote-up-karmada.sh
to expose karmada-apiserver
by a service with LoadBalancer
type that requires your cluster to have deployed the Load Balancer
.
All you need to do is set an environment:
export LOAD_BALANCER=true
Installโ
From the root
directory of the karmada
repo, install Karmada by command:
hack/remote-up-karmada.sh <kubeconfig> <context_name>
kubeconfig
is your cluster's kubeconfig that you want to install tocontext_name
is the name of context in 'kubeconfig'
For example:
hack/remote-up-karmada.sh $HOME/.kube/config mycluster
If everything goes well, at the end of the script output, you will see similar messages as follows:
------------------------------------------------------------------------------------------------------
โโโโโ โโโโ โโโโโโโโโ โโโโโโโโโโโ โโโโโโ โโโโโโ โโโโโโโโโ โโโโโโโโโโ โโโโโโโโโ
โโโโโ โโโโ โโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโ โโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ
โโโโ โโโ โโโโ โโโโ โโโโ โโโโ โโโโโโโโโโโโโโ โโโโ โโโโ โโโโ โโโโโ โโโโ โโโโ
โโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโ โโโโ โโโโโโโโโโโโ โโโโ โโโโ โโโโโโโโโโโโ
โโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโ โโโ โโโโ โโโโโโโโโโโโ โโโโ โโโโ โโโโโโโโโโโโ
โโโโ โโโโโ โโโโ โโโโ โโโโ โโโโ โโโโ โโโโ โโโโ โโโโ โโโโ โโโ โโโโ โโโโ
โโโโโ โโโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโโโโโโ โโโโโ โโโโโ
โโโโโ โโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโโโโโโ โโโโโ โโโโโ
------------------------------------------------------------------------------------------------------
Karmada is installed successfully.
Kubeconfig for karmada in file: /root/.kube/karmada.config, so you can run:
export KUBECONFIG="/root/.kube/karmada.config"
Or use kubectl with --kubeconfig=/root/.kube/karmada.config
Please use 'kubectl config use-context karmada-apiserver' to switch the cluster of karmada control plane
And use 'kubectl config use-context your-host' for debugging karmada installation