# 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 `controlplane01` node and then copied over to workers using `scp`. Once this is done, the commands are to be run on first worker instance: `node01`. 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 `controlplane01`: [//]: # (host:controlplane01) ```bash NODE01=$(dig +short node01) ``` ```bash cat > openssl-node01.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: `node01` ## Verification [//]: # (host:controlplane01) Now return to the `controlplane01` node. List the registered Kubernetes nodes from the controlplane node: ```bash kubectl get nodes --kubeconfig admin.kubeconfig ``` Output will be similar to ``` NAME STATUS ROLES AGE VERSION node01 NotReady 93s v1.28.4 ``` The node is not ready as we have not yet installed pod networking. This comes later. Next: [TLS Bootstrapping Kubernetes Workers](./11-tls-bootstrapping-kubernetes-workers.md)
Prev: [Installing CRI on the Kubernetes Worker Nodes](./09-install-cri-workers.md)