How to set up federation between two Kubernetes clusters?

1/24/2020

I want to set up federation between clusters but because of the differences in the documentation both on the Kubernetes website and also federation repo docs I am a little confused.

On the website it is mentioned that "Use of Federation v1 is strongly discouraged." but their own link is pointing to v1 releases (v1.10.0-alpha.0, v1.9.0-alpha.3, v1.9.0-beta.0) and the latest release there is 2 years old:

v1.10.0-alpha.0:

federation-client-linux-amd64.tar.gz    11.47 MB    application/x-tar   Standard    2/20/18, 8:44:21 AM UTC+1   
federation-client-linux-amd64.tar.gz.sha    103 B   application/octet-stream    Standard    2/20/18, 8:44:20 AM UTC+1   
federation-server-linux-amd64.tar.gz    131.05 MB   application/x-tar   Standard    2/20/18, 8:44:23 AM UTC+1   
federation-server-linux-amd64.tar.gz.sha    103 B   application/octet-stream    Standard    2/20/18, 8:44:20 AM UTC+1

On the other hand, I followed the instruction at installation and I installed kubefedctl-0.1.0-rc6-linux-amd64.tgz but it doesn't have any init command which mentioned in the official Kubernetes website. Kubernetes website:

kubefed init fellowship \
    --host-cluster-context=rivendell \
    --dns-provider="google-clouddns" \
    --dns-zone-name="example.com."

Latest release kubefedctl help:

$kubefedctl -h

kubefedctl controls a Kubernetes Cluster Federation. Find more information at https://sigs.k8s.io/kubefed.

Usage:
  kubefedctl [flags]
  kubefedctl [command]

Available Commands:
  disable            Disables propagation of a Kubernetes API type
  enable             Enables propagation of a Kubernetes API type
  federate           Federate creates a federated resource from a kubernetes resource
  help               Help about any command
  join               Register a cluster with a KubeFed control plane
  orphaning-deletion Manage orphaning delete policy
  unjoin             Remove the registration of a cluster from a KubeFed control plane
  version            Print the version info

Flags:
      --alsologtostderr                  log to standard error as well as files
  -h, --help                             help for kubefedctl
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-file string                  If non-empty, use this log file
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --logtostderr                      log to standard error instead of files (default true)
      --skip-headers                     If true, avoid header prefixes in the log messages
      --stderrthreshold severity         logs at or above this threshold go to stderr
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "kubefedctl [command] --help" for more information about a command.

And then there is the helm chart which says "It builds on the sync controller (a.k.a. push reconciler) from Federation v1 to iterate on the API concepts laid down in the brainstorming doc and further refined in the architecture doc." Therefore if I am not wrong it means the helm chart is based on Federation v1 which is Deprecated.

Also, the userguid on the repo is not helpful in this case. It shows how to "Enables propagation of a Kubernetes API type" but nothing about setting up a host cluster (something equal to kubefed init).

Can someone please let me know how can I set up a federated multi-cluster Kubernetes on bare metal and join another cluster to it?

-- AVarf
kubernetes

0 Answers