# Bootstrapping the Kubernetes Worker Nodes In this lab you will bootstrap 2 Kubernetes worker nodes. We already installed `containerd` and its dependencies on these nodes in the previous lab. We will now install the kubernetes components - [kubelet](https://kubernetes.io/docs/admin/kubelet) - [kube-proxy](https://kubernetes.io/docs/concepts/cluster-administration/proxies). ## Prerequisites The Certificates and Configuration are created on `master-1` node and then copied over to workers using `scp`. Once this is done, the commands are to be run on first worker instance: `worker-1`. Login to first worker instance using SSH Terminal. ### Provisioning Kubelet Client Certificates Kubernetes uses a [special-purpose authorization mode](https://kubernetes.io/docs/admin/authorization/node/) called Node Authorizer, that specifically authorizes API requests made by [Kubelets](https://kubernetes.io/docs/concepts/overview/components/#kubelet). In order to be authorized by the Node Authorizer, Kubelets must use a credential that identifies them as being in the `system:nodes` group, with a username of `system:node:`. In this section you will create a certificate for each Kubernetes worker node that meets the Node Authorizer requirements. Generate a certificate and private key for one worker node: On `master-1`: [//]: # (host:master-1) ```bash WORKER_1=$(dig +short worker-1) ``` ```bash cat > openssl-worker-1.cnf < The `resolvConf` configuration is used to avoid loops when using CoreDNS for service discovery on systems running `systemd-resolved`. Create the `kubelet.service` systemd unit file: ```bash cat < Remember to run the above commands on worker node: `worker-1` ## Verification [//]: # (host:master-1) Now return to the `master-1` node. List the registered Kubernetes nodes from the master node: ```bash kubectl get nodes --kubeconfig admin.kubeconfig ``` > output ``` NAME STATUS ROLES AGE VERSION worker-1 NotReady 93s v1.24.3 ``` The node is not ready as we have not yet installed pod networking. This comes later. Prev: [Installing CRI on the Kubernetes Worker Nodes](09-install-cri-workers.md)
Next: [TLS Bootstrapping Kubernetes Workers](11-tls-bootstrapping-kubernetes-workers.md)