Labsco
MCP SERVER

Kubernetes Automated Installation

by maruduck

Install a Kubernetes master and worker nodes on Rocky Linux boxes over SSH, driven from a chat instead of a runbook.

Containers, Kubernetes & Cluster Operations
Summary
The join token is the part it actually saves you.

The tedious step in a manual kubeadm build is not the install, it is copying the join command off the master and onto every node without mistyping it. This server captures that command to a file on the master and replays it on each client, so adding a node is one instruction rather than a shell round trip. The scope is narrow and honest about it: Rocky Linux, one documented kubernetes version, and an `exec` tool for everything else.

What it is

An MCP server that automates a Kubernetes install on Rocky Linux hosts. You give it SSH details for a master and for each client node; it prepares the environment, runs the install, and carries the `kubeadm join` command from the master over to the nodes. Written against Rocky-8.10 minimal in VirtualBox with kubernetes 1.29.

What you get
  • SSH details registered for the master and for each client node, with a connectivity check before anything runs — `master_set_ssh`, `client_set_ssh`, `connect_test`
  • The host prepared for a cluster install: package updates and the environment settings kubeadm expects — `update`, `setting_env`
  • A master node installed, and the resulting `kubeadm join` command captured to `token.txt` in the home directory so it can be replayed — `k8s_master_install`, `master_token`
  • A worker node installed and joined to the master using that stored command — `k8s_client_install`, `k8s_client_token`
  • An escape hatch for anything the flow does not cover: run a command on the connected host — `exec`
Requirements

SSH access to each host and a user with passwordless sudo — the README's setup step adds a `NOPASSWD: ALL` line at the end of the sudoers file, and says to put it last so it is not overridden by an earlier rule. Run `dnf update -y` first: the install is long enough that a pending update can push a call past its timeout, which is why the sample config sets a very large `requestTimeout`. The package is `k8s-install-mcp` (0.1.3 in pyproject) and launches through `uvx`, through `uv run` against a clone, or from a virtualenv's Python.

Setup effort

One command — uvx k8s-install-mcp