2 Commits

Author SHA1 Message Date
Andrey Smirnov
41430e72d2 fix: handle case when kubelet serving certificates are issued
If kubelet is configured to issue certificates from the control plane,
`/var/lib/kubelet/pki/kubelet.crt` file is never created, and cluster CA
canv be used to verify the TLS connection.

Use k8s `RESTClient` instead of a custom client, this also results in
much more descriptive error messages if API call fails.

Fix a problem in apid on worker nodes with issued serving certificates:
`/var/lib/kubelet/pki` doesn't exist by the time `apid` starts.

First write static pods, then try to build kubelet client: for issued
serving kubelet certificates, control plane should be up first.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-02-19 13:21:26 -08:00
Andrey Smirnov
0aaf8fa968 feat: replace bootkube with Talos-managed control plane
Control plane components are running as static pods managed by the
kubelets.

Whole subsystem is managed via resources/controllers from os-runtime.

Many supporting changes/refactoring to enable new code paths.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-01-26 14:22:35 -08:00