Brad Beam d8249c8779
refactor(init): Allow kubeadm init on controlplane (#658)
* refactor(init): Allow kubeadm init on controlplane

This shifts the cluster formation from init(bootstrap) and join(control plane)
to init(control plane).

This makes use of the previously implemented initToken to provide a TTL for
cluster initialization to take place and allows us to mostly treat all control
plane nodes equal. This also sets up the path for us to handle master upgrades
and not be concerned with odd behavior when upgrading the previously defined
init node.

To facilitate kubeadm init across all control plane nodes, we make use of the
initToken to run `kubeadm init phase certs` command to generate any missing
certificates once. All other control plane nodes will attempt to sync the
necessary certs/files via all defined trustd endpoints and being the startup
process.

* feat(init): Add service runner context to PreFunc

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-24 16:05:49 -05:00
..
2019-04-11 15:24:51 -07:00

Run a local talos cluster using docker

# standup HA cluster
make

# standup single-node k8s
make SERVICES=master-1

# use a specific image tag
make TAG=<image_tag>


# connect using ../../build/osctl-linux-amd64
## master-1
./osctl ps
## master-2
./osctl -t master-2 ps


# use kubectl
make kubeconfig

## apply PSP & CNI
make manifests

## get nodes
./kubectl.sh get nodes

# read init logs  (container stdout equiv. to /dev/kmsg)
docker-compose logs -f

# export all logs directly from docker  (useful if osd is down or init is broken)
sudo docker cp master-1:/var/log master-1-logs
sudo chown -R $USER master-1-logs
chmod -R +rw master-1-logs


# cleanup
make clean