diff --git a/README.md b/README.md index 5f3412d8da2836f95969ea454aa24beda82ff952..80453a62b9b3921e58d4cc03c4a9ca998d6aad9b 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,64 @@ switch context: ``` $ kubectl config use-context <context-name> ``` + +## Installation + +### KubeFed client (kubefedctl) + +To install the KubeFed client follow the below command in your local machine: + +``` +$ VERSION=0.2.0-alpha.1 +$ OS=linux +$ ARCH=amd64 +$ curl -LO https://github.com/kubernetes-sigs/kubefed/releases/download/v${VERSION}/kubefedctl-${VERSION}-${OS}-${ARCH}.tgz +$ tar -zxvf kubefedctl-*.tgz +$ chmod u+x kubefedctl +$ sudo mv kubefedctl /usr/local/bin/ # make sure the location is in the PATH +``` + +**N.B.**: the versions we tested are: 0.1.0-rc6 and 0.2.0-alpha.1, you can try the latest version. + +### KubeFed server (Control Plane) + +To install the Controll Plane, switch to the host context and configuring the RBAC role for Helm (in this case we use Helm v2): + +``` +$ cat << EOF | kubectl apply -f - + apiVersion: v1 + kind: ServiceAccount + metadata: + name: tiller + namespace: kube-system + --- + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: tiller + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin + subjects: + - kind: ServiceAccount + name: tiller + namespace: kube-system + EOF +``` + +helm init command: +``` +$ helm init --service-account tiller +``` + +Now it is possible install the Control Plane on the Host Cluster: + +``` +$ helm repo add kubefed-charts https://raw.githubusercontent.com/kubernetes-sigs/kubefed/master/charts +$ helm install kubefed-charts/kubefed --name kubefed --version=0.2.0-alpha.1 --namespace kube-federation-system +``` + +**N.B.**: use the same version for client and server. + +**N.B.**: in this way the Control Plane can find Federated resources in each namespace, to limit this action in a specific namespace add the parameter `--set global.scope=Namespaced`.