Skip to main content
Glama

K8s_MCP

An Model Context Protocol server that lets language models directly manage and visualize Kubernetes clusters through safe, high-level operational tools.

🚀 AI'da Kullanım (Kurulum)

MCP server'ınızı Claude Desktop, Cursor veya diğer MCP destekleyen AI araçlarında kullanabilirsiniz.

1. Bağımlılıkları Kurun

# Python bağımlılıklarını kurun
pip install -r requirements.txt

# kubectl'in kurulu olduğundan emin olun
kubectl version --client

2. MCP Yapılandırması

Claude Desktop için:

  1. Claude Desktop'u açın

  2. MCP ayarları dosyasını bulun:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  3. Yapılandırma dosyasını düzenleyin:

{
  "mcpServers": {
    "k8s-mcp-server": {
      "command": "python",
      "args": [
        "server.py"
      ],
      "cwd": "Your mcp server path here",
      "env": {
        "KUBECONFIG": ""
      }
    }
  }
}

Önemli: cwd yolunu kendi proje dizininize göre güncelleyin!

Cursor için:

Cursor zaten MCP desteğine sahip. Eğer Cursor kullanıyorsanız, MCP server otomatik olarak algılanabilir veya manuel olarak yapılandırmanız gerekebilir.

  1. Cursor ayarlarını açın

  2. MCP bölümüne gidin

  3. Yeni MCP server ekleyin:

    • Name: k8s-mcp-server

    • Command: python

    • Args: ["server.py"]

    • Working Directory: Proje dizininizin tam yolu

3. Test Edin

Claude Desktop veya Cursor'u yeniden başlatın ve AI'a şunu sorun:

"Kubernetes cluster'ımdaki pod'ları listele"

veya

"default namespace'indeki deployment'ları göster"

4. Kullanılabilir Komutlar

MCP server'ınız aşağıdaki komutları destekler:

  • Pod İşlemleri: list_pods, get_pod_logs, describe_pod

  • Deployment İşlemleri: list_deployments, scale_deployment, restart_deployment

  • YAML İşlemleri: apply_yaml, get_yaml

  • Event İzleme: list_events

  • Service İşlemleri: list_services, describe_service

  • Namespace İşlemleri: list_namespaces, create_namespace, delete_namespace

  • Node İşlemleri: list_nodes, describe_node, cluster_info, list_pods_by_node

Sorun Giderme

Problem: MCP server bağlanmıyor

  • Python'un PATH'te olduğundan emin olun

  • cwd yolunun doğru olduğunu kontrol edin

  • pip install -r requirements.txt komutunu çalıştırdığınızdan emin olun

Problem: Kubernetes bağlantı hatası

  • kubectl komutunun çalıştığını kontrol edin: kubectl cluster-info

  • KUBECONFIG ortam değişkeninin doğru ayarlandığından emin olun

Related MCP server: Kubectl MCP Tool

Pod'ları Canlı Görüntüleme Platformları

Deployment'larınızı kurduktan sonra pod'ları canlı görmek için aşağıdaki platformları kullanabilirsiniz:

1. Kubernetes Dashboard (Resmi Web UI)

Kubernetes'in resmi web arayüzü. Pod'ları, deployment'ları, servisleri ve diğer kaynakları görsel olarak yönetebilirsiniz.

Kurulum (Otomatik Script):

# Windows PowerShell
.\open-dashboard.ps1

Kurulum (Manuel):

# Dashboard'u kurun
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml

# Service Account ve ClusterRoleBinding oluşturun
kubectl create serviceaccount dashboard-admin-sa -n kubernetes-dashboard
kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:dashboard-admin-sa

# Token'ı alın
kubectl -n kubernetes-dashboard create token dashboard-admin-sa

# Dashboard'a erişim için port-forward
kubectl port-forward -n kubernetes-dashboard service/kubernetes-dashboard 8443:443

Tarayıcıda https://localhost:8443 adresine gidin ve token ile giriş yapın.

2. Lens (Desktop Uygulaması)

Güçlü bir desktop uygulaması. Gerçek zamanlı pod durumları, log görüntüleme ve kaynak kullanımı grafikleri.

Kurulum:

  • Lens'i indirin ve kurun

  • Kubernetes cluster'ınıza bağlanın (kubeconfig dosyanızı seçin)

  • Tüm pod'ları, deployment'ları ve servisleri canlı görebilirsiniz

3. k9s (Terminal Tabanlı)

Terminal üzerinden hızlı ve etkili bir arayüz.

Kurulum:

# Windows (Chocolatey)
choco install k9s

# veya Scoop
scoop install k9s

# Kullanım
k9s

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables interaction with Kubernetes/Minikube clusters through natural language, allowing AI agents like Codename Goose to manage Kubernetes resources via the Model Context Protocol.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with Kubernetes clusters through natural language, supporting core Kubernetes operations, monitoring, security, and diagnostics.
    94
    956
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server for Kubernetes that provides full resource coverage and advanced troubleshooting tools via HTTP chunked streaming. It enables users to manage clusters and diagnose complex issues like pod crashloops through specialized prompts and standard kubectl-like operations.
    8,657
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dousery/K8s_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server