README
¶
Cluster Federation
Kubernetes Cluster Federation enables users to federate multiple Kubernetes clusters. Please see the user guide and the admin guide for more details about setting up and using the Cluster Federation.
Building Kubernetes Cluster Federation
Please see the Kubernetes Development Guide
for initial setup. Once you have the development environment setup
as explained in that guide, you also need to install jq
Building cluster federation artifacts should be as simple as running:
make build
You can specify the docker registry to tag the image using the KUBE_REGISTRY environment variable. Please make sure that you use the same value in all the subsequent commands.
To push the built docker images to the registry, run:
make push
To initialize the deployment run:
(This pull the installer images)
make init
To deploy the clusters and install the federation components, edit the
${KUBE_ROOT}/_output/federation/config.json
file to describe your
clusters and run:
make deploy
To turn down the federation components and tear down the clusters run:
make destroy
Ideas for improvement
-
Split the
build
phase (make recipe) into multiple phases:init
: pull installer imagesbuild-binaries
build-docker
build
: build-binary + build-dockerpush
: to push the built imagesgenconfig
deploy-clusters
deploy-federation
deploy
: deploy-clusters + deploy-federationdestroy-federation
destroy-clusters
destroy
: destroy-federation + destroy-clustersredeploy-federation
: just redeploys the federation components.
-
Continue with
destroy
phase even in the face of errors.The bash script sets
set -e errexit
which causes the script to exit at the very first error. This should be the default mode for deploying components but not for destroying/cleanup.
Directories
¶
Path | Synopsis |
---|---|
apis
|
|
federation/v1beta1
Package v1beta1 is a generated protocol buffer package.
|
Package v1beta1 is a generated protocol buffer package. |
client
|
|
clientset_generated/federation_internalclientset
This package has the automatically generated clientset.
|
This package has the automatically generated clientset. |
clientset_generated/federation_internalclientset/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
clientset_generated/federation_internalclientset/typed/core/unversioned
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_internalclientset/typed/core/unversioned/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_internalclientset/typed/extensions/unversioned
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_internalclientset/typed/extensions/unversioned/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_internalclientset/typed/federation/unversioned
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_internalclientset/typed/federation/unversioned/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_release_1_3
This package has the automatically generated clientset.
|
This package has the automatically generated clientset. |
clientset_generated/federation_release_1_3/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
clientset_generated/federation_release_1_3/typed/core/v1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_release_1_3/typed/core/v1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_release_1_3/typed/federation/v1beta1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_release_1_4
This package has the automatically generated clientset.
|
This package has the automatically generated clientset. |
clientset_generated/federation_release_1_4/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
clientset_generated/federation_release_1_4/typed/core/v1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_release_1_4/typed/core/v1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_release_1_4/typed/extensions/v1beta1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_release_1_4/typed/extensions/v1beta1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
clientset_generated/federation_release_1_4/typed/federation/v1beta1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset_generated/federation_release_1_4/typed/federation/v1beta1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
cmd
|
|
federation-apiserver
apiserver is the main api server and master for the cluster.
|
apiserver is the main api server and master for the cluster. |
federation-apiserver/app
Package app does all of the work necessary to create a Kubernetes APIServer by binding together the API, master and APIServer infrastructure.
|
Package app does all of the work necessary to create a Kubernetes APIServer by binding together the API, master and APIServer infrastructure. |
federation-apiserver/app/options
Package options contains flags and options for initializing federation-apiserver.
|
Package options contains flags and options for initializing federation-apiserver. |
pkg
|
|
dnsprovider
dnsprovider supplies interfaces for dns service providers (e.g.
|
dnsprovider supplies interfaces for dns service providers (e.g. |
dnsprovider/providers/aws/route53
route53 is the implementation of pkg/dnsprovider interface for AWS Route53
|
route53 is the implementation of pkg/dnsprovider interface for AWS Route53 |
dnsprovider/providers/aws/route53/stubs
internal implements a stub for the AWS Route53 API, used primarily for unit testing purposes
|
internal implements a stub for the AWS Route53 API, used primarily for unit testing purposes |
dnsprovider/providers/google/clouddns
clouddns is the implementation of pkg/dnsprovider interface for Google Cloud DNS
|
clouddns is the implementation of pkg/dnsprovider interface for Google Cloud DNS |
federation-controller
Package federation_controller contains code for controllers (like the cluster controller).
|
Package federation_controller contains code for controllers (like the cluster controller). |
federation-controller/cluster
Package cluster contains code for syncing cluster
|
Package cluster contains code for syncing cluster |
federation-controller/service
Package service contains code for syncing Kubernetes services, and cloud DNS servers with the federated service registry.
|
Package service contains code for syncing Kubernetes services, and cloud DNS servers with the federated service registry. |
federation-controller/util
TODO: consider moving it to a more generic package.
|
TODO: consider moving it to a more generic package. |
registry
|
|