{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/comments/67577825","id":67577825,"diff_hunk":"@@ -0,0 +1,103 @@\n+---\n+---\n+This guide explains how to set up a federation cluster. Federation is an alpha feature which lets you control multiple kubernetes clusters.\n+[Federation proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/federation.md) has more details.\n+\n+\n+* TOC\n+{:toc}\n+\n+## Prerequisites\n+\n+This guide assumes that you have a running kubernetes cluster.\n+If not, then you can head over to the [getting started guides](/docs/getting-started-guides/) to bring up a cluster.\n+\n+This guide also assumes that you have the kubernetes source code.\n+If not, then you can head over to the [download kubernetes guide](/docs/getting-started-guides/binary_release/) to get the source code.\n+\n+## Setting up federation control plane\n+\n+### Building and pushing federation control binaries\n+\n+You can build the federation control plane binaries using the following command:\n+\n+```shell\n+$ FEDERATION=true KUBE_RELEASE_RUN_TESTS=n make quick-release\n+```\n+\n+Next, you need to push the images to a registry from where your kubernetes cluster can read them.\n+If your kubernetes cluster is running on GCE, then you can push the images to `gcr.io/<your-gce-project-name>`.\n+The command to push the images will look like:\n+\n+```shell\n+$ FEDERATION=true FEDERATION_PUSH_REPO_BASE=gcr.io/<your-gce-project-name> ./build/push-federation-images.sh\n+```\n+\n+### Running the federation control plane\n+\n+Federation control plane consists of an etcd, federation-apiserver and federation-controller-manager.\n+You can run these binaries as pods on your existing kubernetes cluster.\n+The command to run these pods on an existing GCE cluster will look like:\n+\n+```shell\n+$ KUBERNETES_PROVIDER=gce FEDERATION_PUSH_REPO_BASE=gcr.io/<your-gce-project-name> ./federation/cluster/federation-up.sh\n+```\n+\n+This creates a namespace `federation` and creates 2 deployments: `federation-apiserver` and `federation-controller-manager`.\n+You can verify that the pods are available by running the following command:\n+\n+```shell\n+$ kubectl get deployments --namespace=federation\n+NAME                            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE\n+federation-apiserver            1         1         1            1           10m\n+federation-controller-manager   1         1         1            1           10m\n+```\n+\n+Running `federation-up.sh` also creates a new record in your kubeconfig for you\n+to be able to talk to federation apiserver. You can view this by running\n+`kubectl config view`.\n+\n+## Registering kubernetes clusters for federation\n+Now that we have the federation control plane up and running, we can start registering kubernetes clusters.\n+\n+First of all, we need to create a secret containing kubeconfig for that kubernetes cluster, which federation control plane will use to talk to that kubernetes cluster.\n+For now, we create this secret in the host kubernetes cluster (that hosts federation control plane). When we start supporting secrets in federation control plane, we will create this secret their.\n+Suppose that your kubeconfig for kubernetes cluster is at /cluster1/kubeconfig, you can run the following command to create the secret:\n+\n+```shell\n+$ kubectl create secret generic cluster1 --namespace=federation --from-file=/cluster1/kubeconfig\n+```\n+\n+Note that the file name should be `kubeconfig` since file name determines the name of the key in the secret.\n+\n+Now that the secret is created, we are ready to register the cluster. The YAML file for cluster will look like:\n+\n+```yaml\n+apiVersion: v1alpha1\n+kind: Cluster\n+metadata:\n+  name: cluster1\n+spec:\n+  serverAddressByClientCIDRs:\n+  - clientCIDR: <client-cidr>\n+    serverAddress: <apiserver-address>\n+  secretRef:\n+    name: <secret-name>\n+```\n+\n+You need to insert the appropriate values for `<client-cidr>`, `<apiserver-address>` and `<secret-name>`.","path":"docs/admin/federation/index.md","position":88,"original_position":88,"commit_id":"79af0f5198766a8a7533fe4cb2259f168eec4727","original_commit_id":"fe3a8516661c915aeb1690ad1d01c63aab46bb3f","user":{"login":"nikhiljindal","id":10199099,"avatar_url":"https://avatars.githubusercontent.com/u/10199099?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhiljindal","html_url":"https://github.com/nikhiljindal","followers_url":"https://api.github.com/users/nikhiljindal/followers","following_url":"https://api.github.com/users/nikhiljindal/following{/other_user}","gists_url":"https://api.github.com/users/nikhiljindal/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhiljindal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhiljindal/subscriptions","organizations_url":"https://api.github.com/users/nikhiljindal/orgs","repos_url":"https://api.github.com/users/nikhiljindal/repos","events_url":"https://api.github.com/users/nikhiljindal/events{/privacy}","received_events_url":"https://api.github.com/users/nikhiljindal/received_events","type":"User","site_admin":false},"body":"added some explanation.\r\nIf you have a globally accessible IP address for that cluster, then you can just set the CIDR to \"0.0.0.0/0\"","created_at":"2016-06-17T21:25:22Z","updated_at":"2016-06-17T21:25:22Z","html_url":"https://github.com/kubernetes/kubernetes.github.io/pull/662#discussion_r67577825","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/comments/67577825"},"html":{"href":"https://github.com/kubernetes/kubernetes.github.io/pull/662#discussion_r67577825"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662","id":73677994,"html_url":"https://github.com/kubernetes/kubernetes.github.io/pull/662","diff_url":"https://github.com/kubernetes/kubernetes.github.io/pull/662.diff","patch_url":"https://github.com/kubernetes/kubernetes.github.io/pull/662.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/662","number":662,"state":"open","locked":false,"title":"Adding a guide for admins to set up federation","user":{"login":"nikhiljindal","id":10199099,"avatar_url":"https://avatars.githubusercontent.com/u/10199099?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhiljindal","html_url":"https://github.com/nikhiljindal","followers_url":"https://api.github.com/users/nikhiljindal/followers","following_url":"https://api.github.com/users/nikhiljindal/following{/other_user}","gists_url":"https://api.github.com/users/nikhiljindal/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhiljindal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhiljindal/subscriptions","organizations_url":"https://api.github.com/users/nikhiljindal/orgs","repos_url":"https://api.github.com/users/nikhiljindal/repos","events_url":"https://api.github.com/users/nikhiljindal/events{/privacy}","received_events_url":"https://api.github.com/users/nikhiljindal/received_events","type":"User","site_admin":false},"body":"Supercedes https://github.com/kubernetes/kubernetes.github.io/pull/656\r\n\r\ncc @kubernetes/sig-cluster-federation @colhom @mml\r\n\r\nGuide with steps for admin to setup federation","created_at":"2016-06-14T04:14:25Z","updated_at":"2016-06-17T21:25:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3d2a825ae3b41a31dde282306f95bf498c5cd93","assignee":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/662/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/statuses/79af0f5198766a8a7533fe4cb2259f168eec4727","head":{"label":"nikhiljindal:addFederationToRelease.13","ref":"addFederationToRelease.13","sha":"79af0f5198766a8a7533fe4cb2259f168eec4727","user":{"login":"nikhiljindal","id":10199099,"avatar_url":"https://avatars.githubusercontent.com/u/10199099?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhiljindal","html_url":"https://github.com/nikhiljindal","followers_url":"https://api.github.com/users/nikhiljindal/followers","following_url":"https://api.github.com/users/nikhiljindal/following{/other_user}","gists_url":"https://api.github.com/users/nikhiljindal/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhiljindal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhiljindal/subscriptions","organizations_url":"https://api.github.com/users/nikhiljindal/orgs","repos_url":"https://api.github.com/users/nikhiljindal/repos","events_url":"https://api.github.com/users/nikhiljindal/events{/privacy}","received_events_url":"https://api.github.com/users/nikhiljindal/received_events","type":"User","site_admin":false},"repo":{"id":61000699,"name":"kubernetes.github.io","full_name":"nikhiljindal/kubernetes.github.io","owner":{"login":"nikhiljindal","id":10199099,"avatar_url":"https://avatars.githubusercontent.com/u/10199099?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhiljindal","html_url":"https://github.com/nikhiljindal","followers_url":"https://api.github.com/users/nikhiljindal/followers","following_url":"https://api.github.com/users/nikhiljindal/following{/other_user}","gists_url":"https://api.github.com/users/nikhiljindal/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhiljindal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhiljindal/subscriptions","organizations_url":"https://api.github.com/users/nikhiljindal/orgs","repos_url":"https://api.github.com/users/nikhiljindal/repos","events_url":"https://api.github.com/users/nikhiljindal/events{/privacy}","received_events_url":"https://api.github.com/users/nikhiljindal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nikhiljindal/kubernetes.github.io","description":"Website/documentation repo","fork":true,"url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io","forks_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/forks","keys_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/teams","hooks_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/hooks","issue_events_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/events","assignees_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/tags","blobs_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/languages","stargazers_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/stargazers","contributors_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/contributors","subscribers_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/subscribers","subscription_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/subscription","commits_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/merges","archive_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/downloads","issues_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/labels{/name}","releases_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/nikhiljindal/kubernetes.github.io/deployments","created_at":"2016-06-13T02:16:27Z","updated_at":"2016-06-13T02:16:30Z","pushed_at":"2016-06-17T21:25:12Z","git_url":"git://github.com/nikhiljindal/kubernetes.github.io.git","ssh_url":"git@github.com:nikhiljindal/kubernetes.github.io.git","clone_url":"https://github.com/nikhiljindal/kubernetes.github.io.git","svn_url":"https://github.com/nikhiljindal/kubernetes.github.io","homepage":null,"size":36770,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:release-1.3","ref":"release-1.3","sha":"ce6bf3d9c25e1c9b275839a79558824b1dd91aa1","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":51478266,"name":"kubernetes.github.io","full_name":"kubernetes/kubernetes.github.io","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes.github.io","description":"Website/documentation repo","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes.github.io","forks_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes.github.io/deployments","created_at":"2016-02-10T22:46:48Z","updated_at":"2016-06-14T09:50:57Z","pushed_at":"2016-06-17T21:25:13Z","git_url":"git://github.com/kubernetes/kubernetes.github.io.git","ssh_url":"git@github.com:kubernetes/kubernetes.github.io.git","clone_url":"https://github.com/kubernetes/kubernetes.github.io.git","svn_url":"https://github.com/kubernetes/kubernetes.github.io","homepage":null,"size":37461,"stargazers_count":48,"watchers_count":48,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":291,"mirror_url":null,"open_issues_count":275,"forks":291,"open_issues":275,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662"},"html":{"href":"https://github.com/kubernetes/kubernetes.github.io/pull/662"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/662"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/issues/662/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/pulls/662/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes.github.io/statuses/79af0f5198766a8a7533fe4cb2259f168eec4727"}}}}
{"actor":{"display_login":"nikhiljindal"}}