8
n8n 한국어amn8n.com

GPT-4o와 MCP 통합 기반의 대화식 Kubernetes 관리

중급

이것은DevOps, AI분야의자동화 워크플로우로, 14개의 노드를 포함합니다.주로 McpClientTool, Agent, ChatTrigger, LmChatOpenAi, MemoryBufferWindow 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. GPT-4o와 MCP 통합을 기반으로 한 대화식 Kubernetes 관리

사전 요구사항
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "66f06061721f1f7966ba3bdd29bb7db37d84222e0e73cbdc5057760193ad29bf",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "41c2617e-b606-473d-ac07-ac0c5901935a",
      "name": "채팅 메시지 수신 시",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        400,
        -80
      ],
      "webhookId": "2eb47787-160f-49ad-b98d-1d8ee757765c",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        800,
        -80
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are a Kubernetes assistant connected to an MCP (Model Context Protocol) Server. Your role is to help users monitor, inspect, and troubleshoot Kubernetes resources using the following tools.\ncurrent time is {{ $now.setZone('Asia/Tehran') }}\n\nAvailable Tools:\n1. getEvents(namespace) – Fetch events in the given namespace.\n2. getPodsLogs(namespace, podName) – Retrieve logs for a specific pod.\n3. getResource(namespace, resourceKind, resourceName) – Get details of a specific resource.\n4. createOrUpdateResource(namespace, resourceYaml) – Create or update a resource using full YAML.\n5. getNodeMetrics(nodeName) – Retrieve CPU and memory usage of a node.\n6. getPodMetrics(namespace, podName) – Retrieve CPU and memory usage of a pod.\n7. describeResource(namespace, resourceKind, resourceName) – Detailed description of a resource.\n8. listResources(namespace, resourceKind) – List all resources of a given kind in a namespace. for example{\"Kind\": \"Pod\",\"namespace\": \"x\"}\n9. getAPIResources() – List all supported resource kinds in the cluster.\n\nUsage Rules:\n***keep your answers short and meaningful***\n- Always validate input arguments before calling any tool.\n- Ask the user for any missing information (e.g., namespace, podName, resourceKind).\n- Do not assume defaults; always confirm with the user.\n- Avoid destructive operations unless explicitly instructed (only createOrUpdateResource modifies the cluster).\n- Use getAPIResources() to help the user explore available resource kinds.\n- Respond with concise, plain-language explanations of the results when helpful.\n"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "61247bd0-5e76-4165-af70-26c0d605d12f",
      "name": "심플 메모리",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        340,
        140
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "f8136d5d-c5db-4c4f-a080-ad65d5ef9aac",
      "name": "MCP 클라이언트",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        460,
        260
      ],
      "parameters": {
        "connectionType": "sse"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "47eae87b-f2fa-46d5-9f77-d168e47e9bfe",
      "name": "getAPIResources",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        580,
        260
      ],
      "parameters": {
        "toolName": "getAPIResources",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAPIResources\",\n  \"params\": {\n    \"arguments\": {\n      \"includeNamespaceScoped\": true,\n      \"includeClusterScoped\": true\n    }\n  }\n}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "648eacf9-436d-44d6-9389-a0a5212071fa",
      "name": "listResources",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        740,
        260
      ],
      "parameters": {
        "toolName": "listResources",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"Kind\": \"{{ $fromAI('Kind', 'Select the kind given by ai agent', 'string') }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a62f3378-65fe-4178-9fba-b52ba437ca38",
      "name": "describeResource",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        900,
        260
      ],
      "parameters": {
        "toolName": "describeResource",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"Kind\": \"{{ $fromAI('Kind', 'Select the kind given by ai agent', 'string') }}\",\n\"name\" : \"{{ $fromAI('name', 'Select the name given by ai agent', 'string') }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c159ae52-4963-4103-93ad-083230b46da3",
      "name": "getPodMetrics",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1040,
        260
      ],
      "parameters": {
        "toolName": "getPodMetrics",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"podName\" : \"{{ $fromAI('podName', 'Select the pod name given by ai agent', 'string') }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f49b0804-b15a-4a7d-ac9f-44f51795abdf",
      "name": "getNodeMetrics",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1180,
        260
      ],
      "parameters": {
        "toolName": "getNodeMetrics",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"Name\" : \"{{ $fromAI('Name', 'Select the name given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "decd4807-5dbe-4f65-8bd5-8401ee2b0154",
      "name": "createorUpdateResource",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1340,
        240
      ],
      "parameters": {
        "toolName": "createResource",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"manifest\" : \"{{ $fromAI('manifest', 'Select the manifest given by ai agent', 'string').trim() }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1b1bc11c-565e-46f7-8b38-e74489ea2372",
      "name": "getResource",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1440,
        140
      ],
      "parameters": {
        "toolName": "getResource",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"kind\": \"{{ $fromAI('kind', 'Select the kind given by ai agent', 'string') }}\",\n\"name\" : \"{{ $fromAI('name', 'Select the name given by ai agent', 'string') }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f34b5527-c048-4e6e-b86a-585a586ef8ff",
      "name": "getPodsLogs",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1420,
        -20
      ],
      "parameters": {
        "toolName": "getPodsLogs",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\"Name\" : \"{{ $fromAI('Name', 'Select the name given by ai agent', 'string') }}\",\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "68234560-f7f9-4a6a-9579-497ff458fedc",
      "name": "getEvents",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        1340,
        -160
      ],
      "parameters": {
        "toolName": "getEvents",
        "operation": "executeTool",
        "connectionType": "sse",
        "toolParameters": "={\n\"namespace\" : \"{{ $fromAI('namespace', 'Select the namespace given by ai agent', 'string') }}\"}"
      },
      "credentials": {
        "mcpClientSseApi": {
          "id": "eyJUyjbc2529AKLS",
          "name": "k8s"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9a20f489-799e-44aa-a6cd-2f68814113a6",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        220,
        140
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "maxTokens": -1
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "CvwUuKPhahoMTR21",
          "name": "OpenAi play ground"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "68234560-f7f9-4a6a-9579-497ff458fedc": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f8136d5d-c5db-4c4f-a080-ad65d5ef9aac": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f34b5527-c048-4e6e-b86a-585a586ef8ff": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "1b1bc11c-565e-46f7-8b38-e74489ea2372": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "61247bd0-5e76-4165-af70-26c0d605d12f": {
      "ai_memory": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "c159ae52-4963-4103-93ad-083230b46da3": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "648eacf9-436d-44d6-9389-a0a5212071fa": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f49b0804-b15a-4a7d-ac9f-44f51795abdf": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "47eae87b-f2fa-46d5-9f77-d168e47e9bfe": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "a62f3378-65fe-4178-9fba-b52ba437ca38": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "9a20f489-799e-44aa-a6cd-2f68814113a6": {
      "ai_languageModel": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "decd4807-5dbe-4f65-8bd5-8401ee2b0154": {
      "ai_tool": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "41c2617e-b606-473d-ac07-ac0c5901935a": {
      "main": [
        [
          {
            "node": "be64c331-8fb2-4efd-a10e-beb1938cdb71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 데브옵스, 인공지능

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수14
카테고리2
노드 유형5
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Reza Gholizade

Reza Gholizade

@reza-gholizade

I'm a seasoned Solution Architect with expertise in designing and implementing complex, scalable systems across various platforms. With a strong foundation in cloud infrastructure, microservices architecture, Kubernetes, and DevOps practices, they specialize in creating innovative solutions using cutting-edge technologies and tools.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34