Member-only story

Adding Nodes to a Kubespray-Deployed Kubernetes Cluster

DaeGon Kim
Dev Genius
Published in
3 min readFeb 17, 2025

This guide describes the process of adding master and worker nodes to an existing Kubernetes cluster deployed with Kubespray.

We assume that a Kubernetes cluster is deployed with kubespray. There are two articles for initial Kubernetes deployment using kubespray.

We also assume that the files for the initial deployment are available. The basic user-provided files are inventory.yaml and ssh config file.

We start with updating inventory.yaml and ssh_config by adding new nodes. The structure of inventory file is shown below. We need to add new nodes in the existing inventory.yaml.

---
all:
vars:
ansible_ssh_common_args: '-o User=<username> -o StrictHostKeyChecking=no'
ansible_ssh_pass: <user password>
ansible_become_pass: <user password>
hosts:
# list of all nodes
# in a form of
# <node-name>:
# ip: <ip address>
# node_labels: # for worker node only
# node-role.kubernetes.io/worker: "" # for worker node only
children:
kube_control_plane:
hosts:
# list of master nodes
# in a form of <node-name>:
kube_node:
hosts:
# list of worker nodes
# in a form of <node-name>:
etcd:
hosts:
# list of etcd nodes
# in a form of <node-name>:
k8s_cluster:
children…

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

What are your thoughts?