diff --git a/README.md b/README.md index a9ee971f24c2d0b51e6fa60b274ce428424e1540..1205dae5a36c2987b6fb04cd21bc10ab66272112 100644 --- a/README.md +++ b/README.md @@ -159,3 +159,33 @@ Command to show federated clusters: ``` $ kubectl -n kube-federation-system get kubefedclusters ``` + +##Enable API + +To enable a resource to be federated it is necessary to use the enable command of kubefedctl: + +``` +$ kubefedctl enable <api-resources-name.api-group> --kubefed-namespace kube-federation-system +``` + +To know the list of resourses: + +``` +$ kubectl api-resources -o wide +``` + +Some examples: + +``` +$ kubefedctl enable deployments.apps --kubefed-namespace kube-federation-system +$ kubefedctl enable services --kubefed-namespace kube-federation-system +$ kubefedctl enable ingresses.extensions --kubefed-namespace kube-federation-system +``` + +Command to disable federated API: + +``` +$ kubefedctl disable services --kubefed-namespace kube-federation-system +``` + +**N.B.**: Do not federate the “kind: pod†resource. In this case, federating a whole namespace will federate pods and deployments at the same time. Deployments will create replicasets which in turn create pods. It will result a duplication of the pods resources.