MCP를 활용한 kubernetes 자동화 설치
Rocky Linux 환경에서 kubernetes 자동화 설치 기능을 갖춘 MCP 에이전트입니다.
설치 환경
- Rocky-8.10-x86_64-minimal.iso
- Virtual Box
- kubernetes 1.29
MCP 환경 설정
git clone
$ git clone https://github.com/maruduck/k8s_install_mcp.git
- uv 실행
{
"mcpServers": {
"k8s": {
"requestTimeout": 12000000000,
"command": "uv",
"args": ["run", "--directory $(clone 경로)\\k8s_install_mcp", "k8s-install-mcp"]
}
}
}
- python venv 실행
$ python -m venv venv
$ venv\Scripts\activate # Mac은 source venv/bin/activate
$ pip install uv
$ uv pip install -r requirements.txt
{
"mcpServers": {
"k8s": {
"requestTimeout": 12000000000,
"command": "$(클론 위치)\\k8s_install_mcp\\.venv\\Scripts\\python.exe",
"args": ["$(클론 위치)\\k8s_install_mcp\\src\\main.py"]
}
}
}
- uvx 사용
{
"mcpServers": {
"k8s": {
"requestTimeout": 12000000000,
"command": "uvx",
"args": ["k8s-install-mcp"]
}
}
}
설치 예시
환경 설정
sudo 권한 부여
$ visudo
# 반드시 마지막 줄에 입력할 것
# 다른 설정의 우선순위에 밀릴 수 있음
(사용자명) ALL=(ALL) NOPASSWD: ALL
타임 아웃 에러 발생 가능성이 있으므로 미리 update를 수행한 후 실행할 것
$ dnf update -y
Master node 설치
k8s 도구를 사용하여 127.0.0.1 호스트 104 포트에서 $(username) 사용자 1234 비밀번호로 k8s 마스터 설치해줘
Client node 설치
k8s 도구를 사용하여 127.0.0.1 호스트 103 포트에서 $(username) 사용자 1234 비밀번호로 node1 노드 이름으로 k8s 클라이언트 설치해줘
함수 목록
- master_set_ssh
- master 노드 ssh 정보 설정
- client_set_ssh
- client 노드 ssh 정보 설정
- master_token
- master의 kubeadm join 명령어($HOME의 token.txt에 저장) 반환
- connect_test
- ssh 연결 테스트
- exec
- 명령어 실행
- update
- dnf update 실행
- setting_env
- k8s 설치 환경 설정
- k8s_master_install
- master 노드 설치
- k8s_client_install
- client 노드 설치
- k8s_client_token
- master token.txt 명령어(kubeadm join) 실행
Metadata
Release files for k8s-install-mcp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| k8s_install_mcp-0.1.3.tar.gz | 26.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k8s_install_mcp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.1 kB
Release files / k8s_install_mcp-0.1.3.tar.gz
| Download URL | k8s_install_mcp-0.1.3.tar.gz |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3ca3f17140c019f28690c266db94e58009247ede75c38677265e13bdfea8433
|
|
BLAKE2b-256 checksum How to use checksums |
e632d9cb697098f3aff9c827ff8367538fe4094251daf0e9b598b1efdd76da13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / k8s_install_mcp-0.1.3-py3-none-any.whl
| Download URL | k8s_install_mcp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
382729a5d351064478f7920ccc0b84949c2df663a02ca039f6707e120a325909
|
|
BLAKE2b-256 checksum How to use checksums |
3656b144f77600d36a7538c07a616e631405c846fcad868c55ce7c7e9cb01481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for k8s-install-mcp 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.