Address review comments.
This commit is contained in:
@@ -16,7 +16,7 @@ existing federation control plane.
|
|||||||
This guide explains how to administer a Kubernetes Cluster Federation
|
This guide explains how to administer a Kubernetes Cluster Federation
|
||||||
using `kubefed`.
|
using `kubefed`.
|
||||||
|
|
||||||
> Note: `kubefed` is in beta as of Kubernetes 1.6.
|
> Note: `kubefed` is a beta feature in Kubernetes 1.6.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -27,21 +27,37 @@ for installation instructions for your platform.
|
|||||||
|
|
||||||
## Getting `kubefed`
|
## Getting `kubefed`
|
||||||
|
|
||||||
Download the client tarball corresponding to Kubernetes version 1.5
|
Download the client tarball corresponding to the latest release and
|
||||||
or later
|
extract the binaries in the tarball with the commands:
|
||||||
[from the release page](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md),
|
|
||||||
extract the binaries in the tarball to one of the directories
|
|
||||||
in your `$PATH` and set the executable permission on those binaries.
|
|
||||||
|
|
||||||
Note: The URL in the curl command below downloads the binaries for
|
```shell
|
||||||
Linux amd64. If you are on a different platform, please use the URL
|
# Linux
|
||||||
for the binaries appropriate for your platform. You can find the list
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s
|
||||||
of available binaries on the [release page](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#client-binaries-1).
|
https://storage.googleapis.com/kubernetes-release/release/stable.txt)/kubernetes-client-linux-amd64.tar.gz
|
||||||
|
tar -xzvf kubernetes-client-linux-amd64.tar.gz
|
||||||
|
|
||||||
|
# OS X
|
||||||
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s
|
||||||
|
https://storage.googleapis.com/kubernetes-release/release/stable.txt)/kubernetes-client-darwin-amd64.tar.gz
|
||||||
|
tar -xzvf kubernetes-client-darwin-amd64.tar.gz
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s
|
||||||
|
https://storage.googleapis.com/kubernetes-release/release/stable.txt)/kubernetes-client-windows-amd64.tar.gz
|
||||||
|
tar -xzvf kubernetes-client-windows-amd64.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: The URLs in the curl commands above download the binaries for
|
||||||
|
`amd64`. If you are on a different architecture, please use a URL
|
||||||
|
appropriate for your architecture. You can find the list of available
|
||||||
|
binaries on the
|
||||||
|
[release page](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#client-binaries-1).
|
||||||
|
|
||||||
|
Copy the extracted binaries to one of the directories in your `$PATH`
|
||||||
|
and set the executable permission on those binaries.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -O https://storage.googleapis.com/kubernetes-release/release/{{page.version}}/kubernetes-client-linux-amd64.tar.gz
|
|
||||||
tar -xzvf kubernetes-client-linux-amd64.tar.gz
|
|
||||||
sudo cp kubernetes/client/bin/kubefed /usr/local/bin
|
sudo cp kubernetes/client/bin/kubefed /usr/local/bin
|
||||||
sudo chmod +x /usr/local/bin/kubefed
|
sudo chmod +x /usr/local/bin/kubefed
|
||||||
sudo cp kubernetes/client/bin/kubectl /usr/local/bin
|
sudo cp kubernetes/client/bin/kubectl /usr/local/bin
|
||||||
@@ -109,7 +125,7 @@ It must also end with a trailing dot.
|
|||||||
|
|
||||||
`kubefed init` sets up the federation control plane in the host
|
`kubefed init` sets up the federation control plane in the host
|
||||||
cluster and also adds an entry for the federation API server in your
|
cluster and also adds an entry for the federation API server in your
|
||||||
local kubeconfig. Note that in the alpha release in Kubernetes 1.5,
|
local kubeconfig. Note that in the beta release in Kubernetes 1.6,
|
||||||
`kubefed init` does not automatically set the current context to the
|
`kubefed init` does not automatically set the current context to the
|
||||||
newly deployed federation. You can set the current context manually by
|
newly deployed federation. You can set the current context manually by
|
||||||
running:
|
running:
|
||||||
@@ -160,9 +176,9 @@ kubefed init fellowship \
|
|||||||
--controllermanager-arg-overrides="--controllers=services=false"
|
--controllermanager-arg-overrides="--controllers=services=false"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuring DNS provider
|
### Configuring a DNS provider
|
||||||
|
|
||||||
Federated service controller programs a DNS provider to expose
|
The Federated service controller programs a DNS provider to expose
|
||||||
federated services via DNS names. Certain cloud providers
|
federated services via DNS names. Certain cloud providers
|
||||||
automatically provide the configuration required to program the
|
automatically provide the configuration required to program the
|
||||||
DNS provider if the host cluster's cloud provider is same as the DNS
|
DNS provider if the host cluster's cloud provider is same as the DNS
|
||||||
@@ -218,7 +234,7 @@ kubefed init fellowship \
|
|||||||
--api-server-advertise-address="10.0.10.20"
|
--api-server-advertise-address="10.0.10.20"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Dynamic provisioning of etcd storage
|
#### Provisioning storage for etcd
|
||||||
|
|
||||||
Federation control plane stores its state in
|
Federation control plane stores its state in
|
||||||
[`etcd`](https://coreos.com/etcd/docs/latest/).
|
[`etcd`](https://coreos.com/etcd/docs/latest/).
|
||||||
@@ -231,12 +247,44 @@ federation control plane restarts. On host clusters that support
|
|||||||
and binds it to a
|
and binds it to a
|
||||||
[`PersistentVolumeClaim`](/docs/user-guide/persistent-volumes/#persistentvolumeclaims)
|
[`PersistentVolumeClaim`](/docs/user-guide/persistent-volumes/#persistentvolumeclaims)
|
||||||
to store [`etcd`](https://coreos.com/etcd/docs/latest/) data. If your
|
to store [`etcd`](https://coreos.com/etcd/docs/latest/) data. If your
|
||||||
host cluster doesn't support dynamic provisioning, then you pass
|
host cluster doesn't support dynamic provisioning, you can also
|
||||||
`--etcd-persistent-storage=false` to `kubefed init` to disable
|
statically provision a
|
||||||
storage provisioning and provide your own
|
[`PersistentVolume`](/docs/user-guide/persistent-volumes/#persistent-volumes).
|
||||||
[`PersistentVolume`](/docs/user-guide/persistent-volumes/#persistent-volumes) and
|
`kubefed init` creates a
|
||||||
|
[`PersistentVolumeClaim`](/docs/user-guide/persistent-volumes/#persistentvolumeclaims)
|
||||||
|
that has the following configuration:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
volume.alpha.kubernetes.io/storage-class: "yes"
|
||||||
|
labels:
|
||||||
|
app: federated-cluster
|
||||||
|
name: fellowship-federation-apiserver-etcd-claim
|
||||||
|
namespace: federation-system
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
```
|
||||||
|
|
||||||
|
To statically provision a
|
||||||
|
[`PersistentVolume`](/docs/user-guide/persistent-volumes/#persistent-volumes),
|
||||||
|
you must ensure that the
|
||||||
|
[`PersistentVolume`](/docs/user-guide/persistent-volumes/#persistent-volumes)
|
||||||
|
that you create has the matching storage class, access mode and
|
||||||
|
at least as much capacity as the requested
|
||||||
[`PersistentVolumeClaim`](/docs/user-guide/persistent-volumes/#persistentvolumeclaims).
|
[`PersistentVolumeClaim`](/docs/user-guide/persistent-volumes/#persistentvolumeclaims).
|
||||||
|
|
||||||
|
Alternatively, you can disable persistent storage completely
|
||||||
|
by passing `--etcd-persistent-storage=false` to `kubefed init`.
|
||||||
|
However, we do not recommended this because your federation control
|
||||||
|
plane cannot survive restarts in this mode.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubefed init fellowship \
|
kubefed init fellowship \
|
||||||
--host-cluster-context=rivendell \
|
--host-cluster-context=rivendell \
|
||||||
@@ -360,9 +408,10 @@ for you.
|
|||||||
|
|
||||||
`kube-dns` configuration must be updated in each joining cluster to
|
`kube-dns` configuration must be updated in each joining cluster to
|
||||||
enable federated service discovery. If the joining Kubernetes cluster
|
enable federated service discovery. If the joining Kubernetes cluster
|
||||||
is version 1.5 or newer and your `kubefed` version 1.6 or later, then
|
is version 1.5 or newer and your `kubefed` is version 1.6 or newer,
|
||||||
this configuration is automatically managed for you when the clusters
|
then this configuration is automatically managed for you when the
|
||||||
are joined or unjoined using `kubefed` `join` or `unjoin` commands.
|
clusters are joined or unjoined using `kubefed` `join` or `unjoin`
|
||||||
|
commands.
|
||||||
|
|
||||||
In all other cases, you must update `kube-dns` configuration manually
|
In all other cases, you must update `kube-dns` configuration manually
|
||||||
as described in the
|
as described in the
|
||||||
@@ -382,7 +431,7 @@ kubefed unjoin gondor --host-cluster-context=rivendell
|
|||||||
## Turning down the federation control plane:
|
## Turning down the federation control plane:
|
||||||
|
|
||||||
Proper cleanup of federation control plane is not fully implemented in
|
Proper cleanup of federation control plane is not fully implemented in
|
||||||
this alpha release of `kubefed`. However, for the time being, deleting
|
this beta release of `kubefed`. However, for the time being, deleting
|
||||||
the federation system namespace should remove all the resources except
|
the federation system namespace should remove all the resources except
|
||||||
the persistent storage volume dynamically provisioned for the
|
the persistent storage volume dynamically provisioned for the
|
||||||
federation control plane's etcd. You can delete the federation
|
federation control plane's etcd. You can delete the federation
|
||||||
|
|||||||
Reference in New Issue
Block a user