flux159/mcp-server-kubernetes

flux159/mcp-server-kubernetes

от flux159
MCP сервер для подключения к Kubernetes и управления кластером через kubectl и Helm. Выполняет операции с ресурсами, масштабирование, деплой, диагностику и port-forwarding. Полезен разработчикам и ...

MCP Server Kubernetes

CI Language Bun Kubernetes Docker Stars Issues PRs Welcome Last Commit Trust Score Ask DeepWiki

MCP Server that can connect to a Kubernetes cluster and manage it. Supports loading kubeconfig from multiple sources in priority order.

https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed

Installation & Usage

Prerequisites

Before using this MCP server with any tool, make sure you have:

  1. kubectl installed and in your PATH
  2. A valid kubeconfig file with contexts configured
  3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
  4. Helm v3 installed and in your PATH (no Tiller required). Optional if you don't plan to use Helm.

You can verify your connection by running kubectl get pods in a terminal to ensure you can connect to your cluster without credential issues.

By default, the server loads kubeconfig from ~/.kube/config. For additional authentication options (environment variables, custom paths, etc.), see ADVANCED_README.md.

Claude Code

Add the MCP server to Claude Code using the built-in command:

claude mcp add kubernetes -- npx mcp-server-kubernetes
cleanup

Очистить все управляемые ресурсы

Очистить все управляемые ресурсы

Параметры

Без параметров.

exec_in_pod

Выполняет команду в поде или контейнере Kubernetes и возвращает вывод. Команда должна быть массивом строк, где первый элемент - исполняемый файл, а остальные элементы - аргументы. Команда выполняется напрямую, без интерпретации оболочкой, для безопасности.

Выполняет команду в поде или контейнере Kubernetes и возвращает вывод. Команда должна быть массивом строк, где первый элемент - исполняемый файл, а остальные элементы - аргументы. Команда выполняется напрямую, без интерпретации оболочкой, для безопасности.

Параметры

  • namestringобязательный

    Name of the pod to execute the command in

  • namespacestring

    Kubernetes namespace

  • commandstring[]обязательный

    Command to execute as an array of strings (e.g. ["ls", "-la", "/app"]). First element is the executable, remaining are arguments. Shell operators like pipes, redirects, or command chaining are not supported - use explicit array format for security.

  • containerstring

    Container name (required when pod has multiple containers)

  • timeoutnumber

    Timeout for command - 60000 milliseconds if not specified

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

explain_resourceтолько чтение

Получить документацию по ресурсу или полю Kubernetes

Получить документацию по ресурсу или полю Kubernetes

Параметры

  • resourcestringобязательный

    Resource name or field path (e.g. 'pods' or 'pods.spec.containers')

  • apiVersionstring

    API version to use (e.g. 'apps/v1')

  • recursiveboolean

    Print the fields of fields recursively

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • outputenum

    Output format (plaintext or plaintext-openapiv2)

    plaintextplaintext-openapiv2
install_helm_chart

Установите Helm-чарт с поддержкой как стандартной, так и шаблонной установки.

Установите Helm-чарт с поддержкой как стандартной, так и шаблонной установки.

Параметры

  • namestringобязательный

    Name of the Helm release

  • chartstringобязательный

    Chart name (e.g., 'nginx') or path to chart directory

  • namespacestringобязательный

    Kubernetes namespace

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • repostring

    Helm repository URL (optional if using local chart path)

  • valuesobject

    Custom values to override chart defaults

  • valuesFilestring

    Path to values file (alternative to values object)

  • useTemplateboolean

    Use helm template + kubectl apply instead of helm install (bypasses auth issues)

  • createNamespaceboolean

    Create namespace if it doesn't exist

kubectl_apply

Применить манифест Kubernetes YAML из строки или файла

Применить манифест Kubernetes YAML из строки или файла

Параметры

  • manifeststring

    YAML manifest to apply

  • filenamestring

    Path to a YAML file to apply (optional - use either manifest or filename)

  • namespacestring

    Kubernetes namespace

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • forceboolean

    If true, immediately remove resources from API and bypass graceful deletion

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_contextтолько чтение

Управление контекстами Kubernetes - вывести список, получить или установить текущий контекст

Управление контекстами Kubernetes - вывести список, получить или установить текущий контекст

Параметры

  • operationenumобязательный

    Operation to perform: list contexts, get current context, or set current context

    listgetset
  • namestring

    Name of the context to set as current (required for set operation)

  • showCurrentboolean

    When listing contexts, highlight which one is currently active

  • detailedboolean

    Include detailed information about the context

  • outputenum

    Output format

    jsonyamlnamecustom
kubectl_create

Создавайте ресурсы Kubernetes разными способами (из файла или с помощью подкоманд)

Создавайте ресурсы Kubernetes разными способами (из файла или с помощью подкоманд)

Параметры

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • outputenum

    Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file

    jsonyamlnamego-templatego-template-filetemplatetemplatefilejsonpathjsonpath-as-jsonjsonpath-file
  • validateboolean

    If true, validate resource schema against server schema

  • manifeststring

    YAML manifest to create resources from

  • filenamestring

    Path to a YAML file to create resources from. The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'manifest' to pass the file's contents instead.

  • resourceTypestring

    Type of resource to create (namespace, configmap, deployment, service, etc.)

  • namestring

    Name of the resource to create

  • namespacestring

    Kubernetes namespace

  • fromLiteralstring[]

    Key-value pair for creating configmap (e.g. ["key1=value1", "key2=value2"])

  • fromFilestring[]

    Path to file for creating configmap/secret (e.g. ["key1=/path/to/file1", "key2=/path/to/file2"]). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use "fromFileContent" to pass file contents directly instead.

  • fromFileContentobject[]

    Inline file contents for creating a configmap/secret, provided by the client instead of a server-side path (e.g. [{"key": "app.conf", "content": "..."}]). Safe on all transports; use this instead of "fromFile" on remote (SSE/Streamable HTTP) servers.

  • secretTypeenum

    Type of secret to create (generic, docker-registry, tls)

    genericdocker-registrytls
  • serviceTypeenum

    Type of service to create (clusterip, nodeport, loadbalancer, externalname)

    clusteripnodeportloadbalancerexternalname
  • tcpPortstring[]

    Port pairs for tcp service (e.g. ["80:8080", "443:8443"])

  • imagestring

    Image to use for the containers in the deployment

  • replicasnumber

    Number of replicas to create for the deployment

  • portnumber

    Port that the container exposes

  • schedulestring

    Cron schedule expression for the CronJob (e.g. "*/5 * * * *")

  • suspendboolean

    Whether to suspend the CronJob

  • commandstring[]

    Command to run in the container

  • labelsstring[]

    Labels to apply to the resource (e.g. ["key1=value1", "key2=value2"])

  • annotationsstring[]

    Annotations to apply to the resource (e.g. ["key1=value1", "key2=value2"])

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_delete

Удаляет ресурсы Kubernetes по типу ресурса, имени, меткам или из файла манифеста.

Удаляет ресурсы Kubernetes по типу ресурса, имени, меткам или из файла манифеста.

Параметры

  • resourceTypestring

    Type of resource to delete (e.g., pods, deployments, services, etc.)

  • namestring

    Name of the resource to delete

  • namespacestring

    Kubernetes namespace

  • labelSelectorstring

    Delete resources matching this label selector (e.g. 'app=nginx')

  • manifeststring

    YAML manifest defining resources to delete (optional)

  • filenamestring

    Path to a YAML file to delete resources from (optional)

  • allNamespacesboolean

    If true, delete resources across all namespaces

  • forceboolean

    If true, immediately remove resources from API and bypass graceful deletion

  • gracePeriodSecondsnumber

    Period of time in seconds given to the resource to terminate gracefully

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_describeтолько чтение

Описывает ресурсы Kubernetes по типу ресурса, имени и, опционально, пространству имён

Описывает ресурсы Kubernetes по типу ресурса, имени и, опционально, пространству имён

Параметры

  • resourceTypestringобязательный

    Type of resource to describe (e.g., pods, deployments, services, etc.)

  • namestringобязательный

    Name of the resource to describe

  • namespacestring

    Kubernetes namespace

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • allNamespacesboolean

    If true, describe resources across all namespaces

kubectl_generic

Выполняет любую команду kubectl с переданными аргументами и флагами

Выполняет любую команду kubectl с переданными аргументами и флагами

Параметры

  • commandstringобязательный

    The kubectl command to execute (e.g. patch, rollout, top)

  • subCommandstring

    Subcommand if applicable (e.g. 'history' for rollout)

  • resourceTypestring

    Resource type (e.g. pod, deployment)

  • namestring

    Resource name

  • namespacestring

    Kubernetes namespace

  • allNamespacesboolean

    If true, run the command across all namespaces

  • outputFormatenum

    Output format (e.g. json, yaml, wide)

    jsonyamlwidenamecustom
  • flagsobject

    Command flags as key-value pairs

  • argsstring[]

    Additional command arguments

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_getтолько чтение

Получает или выводит список ресурсов Kubernetes по типу ресурса, имени и, опционально, namespace.

Получает или выводит список ресурсов Kubernetes по типу ресурса, имени и, опционально, namespace.

Параметры

  • resourceTypestringобязательный

    Type of resource to get (e.g., pods, deployments, services, configmaps, events, etc.)

  • namestring

    Name of the resource (optional - if not provided, lists all resources of the specified type)

  • namespacestring

    Kubernetes namespace

  • outputenum

    Output format

    jsonyamlwidenamecustom
  • allNamespacesboolean

    If true, list resources across all namespaces

  • labelSelectorstring

    Filter resources by label selector (e.g. 'app=nginx')

  • fieldSelectorstring

    Filter resources by field selector (e.g. 'metadata.name=my-pod')

  • sortBystring

    Sort events by a field (default: lastTimestamp). Only applicable for events.

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_logsтолько чтение

Получайте логи из ресурсов Kubernetes, таких как pods, deployments или jobs.

Получайте логи из ресурсов Kubernetes, таких как pods, deployments или jobs.

Параметры

  • resourceTypeenumобязательный

    Type of resource to get logs from

    poddeploymentjobcronjob
  • namestringобязательный

    Name of the resource

  • namespacestringобязательный

    Kubernetes namespace

  • containerstring

    Container name (required when pod has multiple containers)

  • tailnumber

    Number of lines to show from end of logs

  • sincestring

    Show logs since relative time (e.g. '5s', '2m', '3h')

  • sinceTimestring

    Show logs since absolute time (RFC3339)

  • timestampsboolean

    Include timestamps in logs

  • previousboolean

    Include logs from previously terminated containers

  • followboolean

    Follow logs output (not recommended, may cause timeouts)

  • labelSelectorstring

    Filter resources by label selector

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_patch

Обновите одно или несколько полей ресурса с помощью strategic merge patch, JSON merge patch или JSON patch

Обновите одно или несколько полей ресурса с помощью strategic merge patch, JSON merge patch или JSON patch

Параметры

  • resourceTypestringобязательный

    Type of resource to patch (e.g., pods, deployments, services)

  • namestringобязательный

    Name of the resource to patch

  • namespacestring

    Kubernetes namespace

  • patchTypeenum

    Type of patch to apply

    strategicmergejson
  • patchDataobject

    Patch data as a JSON object

  • patchFilestring

    Path to a file containing the patch data (alternative to patchData)

  • dryRunboolean

    If true, only validate the resource, don't actually execute the operation

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_reconnect

Переподключается к API-серверу Kubernetes, пересоздавая все API-клиенты. Используйте это после обновлений кластера (например, обновлений control plane в EKS, которые меняют ENI/IP), чтобы принудительно выполнить свежее разрешение DNS и установить новые TCP-соединения.

Переподключается к API-серверу Kubernetes, пересоздавая все API-клиенты. Используйте это после обновлений кластера (например, обновлений control plane в EKS, которые меняют ENI/IP), чтобы принудительно выполнить свежее разрешение DNS и установить новые TCP-соединения.

Параметры

Без параметров.

kubectl_rollout

Управляет развертыванием ресурса (например, deployment, daemonset, statefulset)

Управляет развертыванием ресурса (например, deployment, daemonset, statefulset)

Параметры

  • subCommandenumобязательный

    Rollout subcommand to execute

    historypauserestartresumestatusundo
  • resourceTypeenumобязательный

    Type of resource to manage rollout for

    deploymentdaemonsetstatefulset
  • namestringобязательный

    Name of the resource

  • namespacestringобязательный

    Kubernetes namespace

  • revisionnumber

    Revision to rollback to (for undo subcommand)

  • toRevisionnumber

    Revision to roll back to (for history subcommand)

  • timeoutstring

    The length of time to wait before giving up (e.g., '30s', '1m', '2m30s')

  • watchboolean

    Watch the rollout status in real-time until completion

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

kubectl_scale

Масштабировать Kubernetes Deployment

Масштабировать Kubernetes Deployment

Параметры

  • namestringобязательный

    Name of the deployment to scale

  • namespacestring

    Kubernetes namespace

  • replicasnumberобязательный

    Number of replicas to scale to

  • resourceTypestring

    Resource type to scale (deployment, replicaset, statefulset)

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

list_api_resourcesтолько чтение

Выведи список API-ресурсов, доступных в кластере

Выведи список API-ресурсов, доступных в кластере

Параметры

  • apiGroupstring

    API group to filter by

  • namespacedboolean

    If true, only show namespaced resources

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • verbsstring[]

    List of verbs to filter by

  • outputenum

    Output format (wide, name, or no-headers)

    widenameno-headers
node_management

Управляйте узлами Kubernetes с помощью операций cordon, drain и uncordon

Управляйте узлами Kubernetes с помощью операций cordon, drain и uncordon

Параметры

  • operationenumобязательный

    Node operation to perform

    cordondrainuncordon
  • nodeNamestring

    Name of the node to operate on (required for cordon, drain, uncordon)

  • forceboolean

    Force the operation even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet (for drain operation)

  • gracePeriodnumber

    Period of time in seconds given to each pod to terminate gracefully (for drain operation). If set to -1, uses the kubectl default grace period.

  • deleteLocalDataboolean

    Delete local data even if emptyDir volumes are used (for drain operation)

  • ignoreDaemonsetsboolean

    Ignore DaemonSet-managed pods (for drain operation)

  • timeoutstring

    The length of time to wait before giving up (for drain operation, e.g., '5m', '1h')

  • dryRunboolean

    Show what would be done without actually doing it (for drain operation)

  • confirmDrainboolean

    Explicit confirmation to drain the node (required for drain operation)

pingтолько чтение

Проверьте, что контрагент всё ещё отвечает и соединение активно.

Проверьте, что контрагент всё ещё отвечает и соединение активно.

Параметры

Без параметров.

port_forward

Перенаправьте локальный порт на порт ресурса Kubernetes

Перенаправьте локальный порт на порт ресурса Kubernetes

Параметры

  • resourceTypestringобязательный
  • resourceNamestringобязательный
  • localPortnumberобязательный
  • targetPortnumberобязательный
  • namespacestring
stop_port_forward

Остановите процесс port-forward.

Остановите процесс port-forward.

Параметры

  • idstringобязательный
uninstall_helm_chart

Удалить релиз Helm-чарта

Удалить релиз Helm-чарта

Параметры

  • namestringобязательный

    Name of the Helm release to uninstall

  • namespacestringобязательный

    Kubernetes namespace

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

upgrade_helm_chart

Обновить существующий релиз Helm chart

Обновить существующий релиз Helm chart

Параметры

  • namestringобязательный

    Name of the Helm release to upgrade

  • chartstringобязательный

    Chart name or path to chart directory

  • namespacestringобязательный

    Kubernetes namespace

  • contextstring

    Kubeconfig Context to use for the command (optional - defaults to null)

  • repostring

    Helm repository URL (optional if using local chart path)

  • valuesobject

    Custom values to override chart defaults

  • valuesFilestring

    Path to values file (alternative to values object)

Другие проверенные MCP-сервера

yepcode/mcp-server-js

yepcode/mcp-server-js

официальный

YepCode MCP сервер превращает YepCode-процессы в готовые инструменты для ИИ-ассистентов. Он запускает скрипты на Python или Node.js в изолированной среде, управляет параметрами через JSON Schema. Идеально для интеграции AI с бизнес-логикой — от выполнения кода до управления API.

TypeScript46
skill-seekers/Skill_Seekers

skill-seekers/Skill_Seekers

MCP-сервер Skill Seekers преобразует документацию, GitHub, PDF, видео и 18 типов источников в структурированные знания для AI-систем. Подходит для создания AI-навыков (Claude, Gemini, OpenAI), RAG-...

Python14495
localstack/localstack-mcp-server

localstack/localstack-mcp-server

официальный

MCP-сервер для управления LocalStack — эмулятором облака. Разворачивайте стек (Terraform, CDK, SAM), анализируйте логи и инжектируйте сбои. Помогает разработчикам и DevOps быстрее отлаживать облачн...

TypeScript26
jau123/MeiGen-AI-Design-MCP

jau123/MeiGen-AI-Design-MCP

MCP-сервер для генерации изображений и видео через ИИ. Работает в Claude Code, Cursor и других AI-инструментах, поддерживает 9 моделей и 1446 промптов. Параллельная генерация, управление стилями и ...

TypeScript1584
bytebase/dbhub

bytebase/dbhub

DBHub — легковесный MCP сервер для работы с базами данных (PostgreSQL, MySQL, SQL Server и другими). Подключает несколько БД сразу, выполняет SQL-запросы и ищет объекты схемы через два компактных инструмента. Безопасный доступ с read-only режимом, SSH-туннелями и SSL — идеально для быстрого иссле...

TypeScript3180
opgginc/opgg-mcp

opgginc/opgg-mcp

официальный

MCP-сервер для доступа AI-агентов к статистике OP.GG: League of Legends, Teamfight Tactics и Valorant. Предоставляет данные по чемпионам, сборкам, профилям игроков, мете, турнирам. Полезен разработ...

TypeScript95
© Каталог MCP, 2026. Все права защищены.
Проект не аффилирован с Anthropic и любыми упомянутыми продуктами.
Все названия и торговые марки принадлежат их владельцам.
Контакты для связи: hi@mcp-katalog.ru

Лука Никитин