kubernetes-bootstrapping/01-cluster-bootstrap/README.md

20 lines
655 B
Markdown
Raw Permalink Normal View History

2023-12-23 05:47:02 +00:00
# 01 | Cluster Bootstrap
2023-12-19 14:12:07 +00:00
2024-02-25 23:05:28 +00:00
Assumption is that an external load balancer is already configured for the cluster control plane IP address. Initialize the cluster on one control node, but do not join any other nodes to it yet.
2023-12-19 14:12:07 +00:00
```bash
2024-02-25 23:05:28 +00:00
# Only run on one control plane node - do not join other nodes until after CNI is configured
2023-12-19 14:12:07 +00:00
sudo kubeadm init --config cluster-config.yaml --upload-certs
```
2023-12-23 05:24:31 +00:00
Copy kube admin config to local profile. This is also a good time to copy it to your desktop with SCP or something.
2023-12-19 14:12:07 +00:00
```bash
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```