From e8c52b0ab0d48b9deb9a1ff3ac037bbc4ff79cd3 Mon Sep 17 00:00:00 2001
From: Marco <marco.lorini@garr.it>
Date: Wed, 7 Oct 2020 11:11:37 +0200
Subject: [PATCH] 2020-10-07 ML: add Enable API section in readme file

---
 README.md | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/README.md b/README.md
index a9ee971..1205dae 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.
-- 
GitLab