Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Federation] Document simplified federation control plane deployment via kubefed. #1822

Merged
merged 3 commits into from
Dec 2, 2016

Conversation

madhusudancs
Copy link
Contributor

@madhusudancs madhusudancs commented Nov 30, 2016

Documentation for kubernetes/enhancements#97.

cc @kubernetes/sig-cluster-federation @nikhiljindal @irfanurrehman @shashidharatd


This change is Reviewable

@madhusudancs
Copy link
Contributor Author

cc @kubernetes/docs

---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
stands for "Kubernetes Federate". It aids in both deploying a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it stood for "Kubernetes Federation" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikhiljindal we wanted to choose a verb, like kubectl = "Kubernetes Control".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is probably not necessary anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed.

@nikhiljindal
Copy link
Contributor

I took a quick look and looks good to me.

in your `$PATH` and set the executable permission on those binaries.

```shell
curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.0/kubernetes-client-linux-amd64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path doesn't exist yet. Are you sure that 1.5 will be released in this path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwielgus yeah, I am pretty sure. A good test is replacing v1.5.0 with v1.4.0.

teach the federation control plane about a cluster by joining that
cluster to the federation.

Joining a cluster to a federation is as simple as running:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You use "as simple as running" at the beginning of the previous subchapter. Please use a different linguistic construction :).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I thought, it would be consistent. But I see your point. Consistency in natural language writing is boring. Need variations. Changed here, but left another instance further below.

cases, you could specify a cluster name that conforms to the RFC 1035
label naming rules and specify the cluster context using the
`--cluster-context` flag. For example, if context of the cluster your
are joining is `gondor_has_no_king-gondor_needs_no_king`, then you can
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a simpler context name, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwielgus the length was intentional, to mimic some cluster names although in a slightly cheesy way.

Cut the length in half.

However, the name of a secret object in Kubernetes should conform
to the subdomain name specification described in RFC 1123. If this isn't case, you can pass the secret name to `kubefed join` using the
`--secret-name` flag. For example, if the cluster name is `noldor` and
the secret name is `11kingdom`, you can join the cluster by running:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name the secret for noldor as noldor-secret?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't demonstrate a valid secret name but an invalid cluster name. The difference are the numbers in the front.

@mwielgus
Copy link
Contributor

Just couple nits. Feel free to apply the label once fixed.

Copy link
Contributor Author

@madhusudancs madhusudancs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwielgus Addressed the review comments. PTAL.

cases, you could specify a cluster name that conforms to the RFC 1035
label naming rules and specify the cluster context using the
`--cluster-context` flag. For example, if context of the cluster your
are joining is `gondor_has_no_king-gondor_needs_no_king`, then you can
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwielgus the length was intentional, to mimic some cluster names although in a slightly cheesy way.

Cut the length in half.

teach the federation control plane about a cluster by joining that
cluster to the federation.

Joining a cluster to a federation is as simple as running:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I thought, it would be consistent. But I see your point. Consistency in natural language writing is boring. Need variations. Changed here, but left another instance further below.

However, the name of a secret object in Kubernetes should conform
to the subdomain name specification described in RFC 1123. If this isn't case, you can pass the secret name to `kubefed join` using the
`--secret-name` flag. For example, if the cluster name is `noldor` and
the secret name is `11kingdom`, you can join the cluster by running:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't demonstrate a valid secret name but an invalid cluster name. The difference are the numbers in the front.

@madhusudancs
Copy link
Contributor Author

Just couple nits. Feel free to apply the label once fixed.

Oops, seeing this now. Adding the label.

- madhusudancs

---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid ast tense.

"Kubernetes version 1.5 includes a new command line tool..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to facilitate the adminstration of cluster federations" -> "to help you administrate your federated clusters."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-donnelly is it right to say "to help you administrate your federation"? I don't want to say "federated clusters" because what they are managing is a federation control plane which is an entity in itself.

---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
stands for "Kubernetes Federate". It aids in both deploying a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is probably not necessary anyway.

Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
stands for "Kubernetes Federate". It aids in both deploying a
Kubernetes Cluster Federation control plane and adding/removing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"kubefed helps you to deploy a new Kubernetes cluster federation control plane, and to add clusters to or remove clusters from an existing federation control plane."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This guide explains how to administer a Kubernetes Cluster Federation
using `kubefed`.

`kubefed` is considered alpha in Kubernetes v1.5.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set this off with a blockquote, like below:

"> Note: kubefed is an alpha feature in Kubernetes 1.5."

kubfed join noldor --host-cluster-context=rivendell --secret-name=11kingdom
```

## Unjoining a cluster:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing a cluster from a federation


## Unjoining a cluster:

Unjoining a cluster from federation is as simple as running:
Copy link
Contributor

@devin-donnelly devin-donnelly Nov 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"To remove a cluster from a federation, run the kubefed unjoin command with the cluster name and the federation's --host-cluster-context:"

kubfed unjoin gondor --host-cluster-context=rivendell
```

where `gondor` is the cluster name you specified while joining the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove paragraph.

this alpha release of `kubefed`. However, for the time being, deleting
the federation system namespace should remove all the resources except
the persistent storage volume dynamically provisioned for the
federation control plane's etcd. This can be accomplished by running:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y"ou can delete the federation namespace by running the following command:"

Also, you might not want to delete the storage volume that stores
the state of your federation control plane. You can then use that
storage volume to resume your federation control plane. We are
evaluating various alternatives to handle this case correctly and that's the reason for not implementing federation control plane turn down in this alpha release.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last sentence is unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the whole paragraph.

Copy link
Contributor Author

@madhusudancs madhusudancs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-donnelly thank you very much for all the corrections! Incorporated them. PTAL.

- madhusudancs

---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-donnelly is it right to say "to help you administrate your federation"? I don't want to say "federated clusters" because what they are managing is a federation control plane which is an entity in itself.

---
Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
stands for "Kubernetes Federate". It aids in both deploying a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed.

Kubernetes v1.5 introduced a new command line tool called `kubefed`
to facilitate the administration of cluster federations. `kubefed`
stands for "Kubernetes Federate". It aids in both deploying a
Kubernetes Cluster Federation control plane and adding/removing
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


## Getting `kubefed`

Download the Kubernetes client tarball corresponding to a release
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioned 1.5. PTAL.


Cluster name supplied to `kubefed join` must be a valid RFC 1035 label.

Furthermore, federation control plane requires credentials of the
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this wording is, it doesn't explicitly state that the cluster name in the command is matched to the context name in the kubeconfig. There is also a concept of cluster name in kubeconfig and we need to ensure that people don't get confused about these two.

How do we reword for that?

local kubeconfig. If it fails to find a matching context, it exits
with an error.

It is particularly a problem in the cases where context names
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

join the cluster by running:

```shell
kubfed join gondor --host-cluster-context=rivendell --cluster-context=gondor_needs-no_king
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

running:

```shell
kubfed join noldor --host-cluster-context=rivendell --secret-name=11kingdom
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops again! Thanks!

Fixed.

Also, you might not want to delete the storage volume that stores
the state of your federation control plane. You can then use that
storage volume to resume your federation control plane. We are
evaluating various alternatives to handle this case correctly and that's the reason for not implementing federation control plane turn down in this alpha release.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the whole paragraph.


## Adding a cluster to a federation

Once you've deployed a federation control plane, you'll need to make
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-donnelly after I made the change suggested here - #1822 (comment), I got a comment from a user who is trying this out saying he would have liked some details explaining why he had to do this (add/join a cluster).

Can we still incorporate that somehow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'd add it as a "note" afterward, like this format:

"> Note: Kubernetes requires that you manually join clusters to a federation control plane because..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-donnelly Thanks. Added a note. PTAL.

@devin-donnelly
Copy link
Contributor

Awesome, thanks. This one looks good to go.

@devin-donnelly devin-donnelly merged commit 34addd3 into kubernetes:release-1.5 Dec 2, 2016
@madhusudancs madhusudancs deleted the kubefed branch January 25, 2017 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants