ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

Kubernetes Troubleshoot

โดย NanaGyamfiPrempeh30รุ่น 1.0.0i★ 0iรันบนเครื่องหน้า repo ↗
ชื่อใน registryio.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp

วิธีติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ ติดตั้งในเครื่อง
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์ · ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES)
  • หมวด เครื่องมือนักพัฒนา
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.

ใช้คู่กับ

Skill ที่สอน AI ทำงานแบบนี้ ใช้ร่วมกับตัวนี้ได้

rea

rea เป็นเครื่องมือเสริมสำหรับ AI agent ใช้ทำ reverse engineering กับสิ่งต่าง ๆ ตั้งแต่พฤติกรรมของแอปพลิเคชันไปจนถึงไบนารีระดับ native

โดย morluto★ 468,7331 skill

Skill · คู่มือ

andrej-karpathy-skills

andrej-karpathy-skills เป็นไฟล์ CLAUDE.md ไฟล์เดียวที่ใช้ปรับพฤติกรรมของ Claude Code ให้ดีขึ้น โดยอ้างอิงจากข้อสังเกตของ Andrej Karpathy เกี่ยวกับข้อผิดพลาดที่พบบ่อยเมื่อ LLM เขียนโค้ด

โดย multica-ai★ 234,3321 skill

Skill · คู่มือไม่ระบุสัญญาอนุญาต

graphify

graphify เป็นเครื่องมือที่แปลงโค้ด เอกสาร สคีมา SQL คอนฟิก และไฟล์ PDF ให้เป็นกราฟความรู้ที่ค้นหาได้ ทำงานแบบ local ผ่านการแยกโครงสร้าง AST และใช้ได้กับ Claude Code, Cursor, Codex และ Gemini CLI

โดย Graphify-Labs★ 150,2871 skill

Skill · คู่มือ

ทำไมอยู่อันดับนี้

หน้ารายการเรียงด้วยคะแนนการใช้งาน (เต็ม 100) จากส่วนเหล่านี้

ความนิยม0/80ดาว GitHub หรือยอดดาวน์โหลดต่อสัปดาห์ ค่ามากนับ 60 ค่าน้อยนับ 20
ความสด7/12ออกรุ่นหรือแก้โค้ดใน 30 วัน ได้เต็ม
ระบบยังตอบ0/8endpoint บนคลาวด์ตอบตอนตรวจล่าสุด
คะแนนการใช้งาน7/100

คุณภาพ: ผลตรวจเบื้องต้นผ่าน 3/3 ข้อ (แสดงให้ดู ไม่ได้ใช้เรียง) · ความมาแรง: ยังไม่มีข้อมูล (ใช้เรียงเฉพาะแท็บมาแรง)

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

  1. ลง Docker ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    docker --version
    • ขึ้นเลขรุ่น เช่น Docker version … = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: ลง Docker Desktop: Mac เปิดไฟล์ Docker.dmg แล้วลากไอคอนไปที่ Applications (เลือกรุ่น Apple silicon หรือ Intel ให้ตรงเครื่อง) · Windows ดับเบิลคลิก Docker Desktop Installer.exe · ลงเสร็จเปิดแอป Docker Desktop ทิ้งไว้ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Docker ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: docker --version

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker

  2. กรอกค่าตั้ง 2 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • KUBECONFIG พาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว
      ดูต้นฉบับภาษาอังกฤษPath to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup fa…
      · ค่าเริ่มต้น /kubeconfig
    • ALLOWED_NAMESPACES namespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น staging,production การใช้ wildcard ( และ all) จะถูกปฏิเสธตอนเริ่มระบบ และ kube-system กับ kube-public จะถูกตัดออกแม้จะระบุไว้ นี่เป็นการป้องกันเชิงลึก
      ดูต้นฉบับภาษาอังกฤษComma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in…

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  4. วางค่าตั้งนี้แล้วบันทึกไฟล์

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  5. ปิดแอป Claude แล้วเปิดใหม่

  6. ลองเลย

    ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • LOG_LEVEL DEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ
    ดูต้นฉบับภาษาอังกฤษDEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.
    · ค่าเริ่มต้น INFO
  • API_TIMEOUT_SECONDS การหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก
    ดูต้นฉบับภาษาอังกฤษKubernetes API request timeout. Must be a positive integer.
    · ค่าเริ่มต้น 30
  • MAX_LOG_LINES จำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน
    ดูต้นฉบับภาษาอังกฤษMaximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.
    · ค่าเริ่มต้น 200

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ Kubernetes Troubleshoot ไม่ได้

Kubernetes Troubleshoot ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ Kubernetes Troubleshoot ได้

  • ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด เครื่องมือนักพัฒนา ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Docker ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    docker --version
    • ขึ้นเลขรุ่น เช่น Docker version … = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: ลง Docker Desktop: Mac เปิดไฟล์ Docker.dmg แล้วลากไอคอนไปที่ Applications (เลือกรุ่น Apple silicon หรือ Intel ให้ตรงเครื่อง) · Windows ดับเบิลคลิก Docker Desktop Installer.exe · ลงเสร็จเปิดแอป Docker Desktop ทิ้งไว้ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Docker ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: docker --version

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker

  2. กรอกค่าตั้ง 2 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • KUBECONFIG พาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว
      ดูต้นฉบับภาษาอังกฤษPath to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup fa…
      · ค่าเริ่มต้น /kubeconfig
    • ALLOWED_NAMESPACES namespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น staging,production การใช้ wildcard ( และ all) จะถูกปฏิเสธตอนเริ่มระบบ และ kube-system กับ kube-public จะถูกตัดออกแม้จะระบุไว้ นี่เป็นการป้องกันเชิงลึก
      ดูต้นฉบับภาษาอังกฤษComma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in…

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  4. วางคำสั่งนี้แล้วกด Enter

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  5. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น Kubernetes Troubleshoot ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  6. ลองเลย

    ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • LOG_LEVEL DEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ
    ดูต้นฉบับภาษาอังกฤษDEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.
    · ค่าเริ่มต้น INFO
  • API_TIMEOUT_SECONDS การหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก
    ดูต้นฉบับภาษาอังกฤษKubernetes API request timeout. Must be a positive integer.
    · ค่าเริ่มต้น 30
  • MAX_LOG_LINES จำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน
    ดูต้นฉบับภาษาอังกฤษMaximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.
    · ค่าเริ่มต้น 200

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Docker ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    docker --version
    • ขึ้นเลขรุ่น เช่น Docker version … = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: ลง Docker Desktop: Mac เปิดไฟล์ Docker.dmg แล้วลากไอคอนไปที่ Applications (เลือกรุ่น Apple silicon หรือ Intel ให้ตรงเครื่อง) · Windows ดับเบิลคลิก Docker Desktop Installer.exe · ลงเสร็จเปิดแอป Docker Desktop ทิ้งไว้ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Docker ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: docker --version

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker

  2. กรอกค่าตั้ง 2 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • KUBECONFIG พาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว
      ดูต้นฉบับภาษาอังกฤษPath to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup fa…
      · ค่าเริ่มต้น /kubeconfig
    • ALLOWED_NAMESPACES namespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น staging,production การใช้ wildcard ( และ all) จะถูกปฏิเสธตอนเริ่มระบบ และ kube-system กับ kube-public จะถูกตัดออกแม้จะระบุไว้ นี่เป็นการป้องกันเชิงลึก
      ดูต้นฉบับภาษาอังกฤษComma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in…

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด Cursor

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ Kubernetes Troubleshoot ช่อง KUBECONFIG, ALLOWED_NAMESPACES ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน Cursor โหมด Agent

  6. ลองเลย

    ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • LOG_LEVEL DEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ
    ดูต้นฉบับภาษาอังกฤษDEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.
    · ค่าเริ่มต้น INFO
  • API_TIMEOUT_SECONDS การหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก
    ดูต้นฉบับภาษาอังกฤษKubernetes API request timeout. Must be a positive integer.
    · ค่าเริ่มต้น 30
  • MAX_LOG_LINES จำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน
    ดูต้นฉบับภาษาอังกฤษMaximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.
    · ค่าเริ่มต้น 200

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Docker ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    docker --version
    • ขึ้นเลขรุ่น เช่น Docker version … = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: ลง Docker Desktop: Mac เปิดไฟล์ Docker.dmg แล้วลากไอคอนไปที่ Applications (เลือกรุ่น Apple silicon หรือ Intel ให้ตรงเครื่อง) · Windows ดับเบิลคลิก Docker Desktop Installer.exe · ลงเสร็จเปิดแอป Docker Desktop ทิ้งไว้ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Docker ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: docker --version

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker

  2. กรอกค่าตั้ง 2 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • KUBECONFIG พาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว
      ดูต้นฉบับภาษาอังกฤษPath to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup fa…
      · ค่าเริ่มต้น /kubeconfig
    • ALLOWED_NAMESPACES namespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น staging,production การใช้ wildcard ( และ all) จะถูกปฏิเสธตอนเริ่มระบบ และ kube-system กับ kube-public จะถูกตัดออกแม้จะระบุไว้ นี่เป็นการป้องกันเชิงลึก
      ดูต้นฉบับภาษาอังกฤษComma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in…

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด VS Code

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ Kubernetes Troubleshoot ช่อง KUBECONFIG, ALLOWED_NAMESPACES ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน VS Code โหมด Agent

  6. ลองเลย

    ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • LOG_LEVEL DEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ
    ดูต้นฉบับภาษาอังกฤษDEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.
    · ค่าเริ่มต้น INFO
  • API_TIMEOUT_SECONDS การหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก
    ดูต้นฉบับภาษาอังกฤษKubernetes API request timeout. Must be a positive integer.
    · ค่าเริ่มต้น 30
  • MAX_LOG_LINES จำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน
    ดูต้นฉบับภาษาอังกฤษMaximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.
    · ค่าเริ่มต้น 200

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ Kubernetes Troubleshoot อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

Claude Desktop (claude_desktop_config.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

Cursor (~/.cursor/mcp.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

VS Code (mcp.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

ค่าที่ต้องใส่เอง

  • KUBECONFIG จำเป็น env
    พาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว
    ดูต้นฉบับภาษาอังกฤษPath to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup fa…
  • ALLOWED_NAMESPACES จำเป็น env
    namespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น staging,production การใช้ wildcard ( และ all) จะถูกปฏิเสธตอนเริ่มระบบ และ kube-system กับ kube-public จะถูกตัดออกแม้จะระบุไว้ นี่เป็นการป้องกันเชิงลึก
    ดูต้นฉบับภาษาอังกฤษComma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in…
  • LOG_LEVEL env
    DEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ
    ดูต้นฉบับภาษาอังกฤษDEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.
  • API_TIMEOUT_SECONDS env
    การหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก
    ดูต้นฉบับภาษาอังกฤษKubernetes API request timeout. Must be a positive integer.
  • MAX_LOG_LINES env
    จำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน
    ดูต้นฉบับภาษาอังกฤษMaximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
ไม่มียอดใน npm/PyPI
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
1.0.0
ส่งเข้า registryi
25 ส.ค. 2569
แก้โค้ดล่าสุดi
25 ส.ค. 2569
ผู้ทำ
NanaGyamfiPrempeh30
แพ็กเกจ
oci: docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0
เว็บผู้ทำ
github.com
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 20 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub NanaGyamfiPrempeh30 ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 3 เดือนที่ผ่านมา

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

ช่องโหว่ที่เปิดเผยแล้ว (OSV.dev)

ไม่ได้ตรวจ: ตรวจได้เฉพาะแพ็กเกจ npm และ PyPI ที่ระบุรุ่น

เราตรวจอะไรบ้าง → · JSON

ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด
สำหรับผู้ทำ: ติดป้ายใน README

ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้

[![แนะนำบน PopNx MCP](https://mcp.popnx.com/badge/nanagyamfiprempeh30-k8s-troubleshoot-mcp.svg?lang=th)](https://mcp.popnx.com/th/servers/nanagyamfiprempeh30-k8s-troubleshoot-mcp)

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบเพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 6202 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 28% ของอีก 6202 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 99% ของอีก 6202 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Kubernetes Troubleshoot ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 3 เดือนที่ผ่านมา และส่งรุ่นล่าสุด (1.0.0) เข้า registry 3 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

ตัวอื่นที่ทำงานคล้ายกัน

หมวดเดียวกันจากผู้ทำคนอื่น ผ่านตัวตรวจคำสั่งแล้ว ตัวทางการขึ้นก่อน แล้วเรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

โดย ahmedkhaleel2004ใช้กันมาก★ 19Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · gitdiagram.comทีม PopNx ลองใช้จริงแล้ว

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

โดย Appllamaใช้กันมาก★ 5.2Kอัปเดต 3 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · appllama.io

Cloudflare MCP

Cloudflare MCP servers

โดย cloudflareใช้กันมาก★ 4.5Kอัปเดต 14 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · mcp.cloudflare.comทีม PopNx ลองใช้จริงแล้ว

Omnara

Deploy durable AI agents with Omnara, an open-source managed-agent platform.

โดย omnara-aiใช้กันมาก★ 3.4Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · omnara.com

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

โดย repowise-devใช้กันมาก↓ 6.5K/สัปดาห์★ 8.2K ดาวรวมทั้งรีโปอัปเดต 7 วันที่ผ่านมา

บนเครื่องหรือคลาวด์✓ เจ้าของบริการ · repowise.dev
เทียบกับตัวที่คล้ายกัน
ตัวนี้
Kubernetes Troubleshoot
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
ทำงานที่ไหนต้องลงในเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องมีทั้งบนคลาวด์และแบบลงเครื่อง
ต้องใส่คีย์ไม่ไม่ไม่ไม่ไม่ไม่
กด + ใน Claude ได้ไม่ไม่ไม่ใช่ไม่ไม่
ผลตรวจเบื้องต้น3/34/44/44/44/45/5
สัญญาอนุญาตMITMITMITApache-2.0Apache-2.0AGPL-3.0
ราคาไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียน

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

k8s-troubleshoot-mcp

A read-only MCP (Model Context Protocol) server that lets an AI assistant diagnose a Kubernetes cluster. Ask why a pod is crash-looping instead of running six kubectl commands and correlating the output by hand.

Read-only is a structural property, not a promise. There are no write tools, and the RBAC manifests grant no write verbs. See Security model.

What It Does

The server exposes 16 diagnostic tools over stdio. Connect it to Claude Desktop, VS Code, or Kiro, and you can ask things like:

  • "Why is the checkout pod in staging not ready?"
  • "Show me the last 50 lines of logs from the api container"
  • "Which nodes are not Ready, and what are their taints?"
  • "Is the web HPA scaling, and what does its current metric say?"
  • "What events fired in production in the last few minutes?"

The assistant calls the tools, the server queries the Kubernetes API with a scoped ServiceAccount token, and every response comes back as a structured dict — including errors, which are never raised as exceptions into the MCP layer.

Architecture

┌──────────────────┐    stdio (JSON-RPC)   ┌──────────────────────────┐

│ MCP Client │◄─────────────────────►│ MCP Server │ │ Claude Desktop │ │ (this project) │ │ VS Code / Kiro │ │ │ └──────────────────┘ │ config.py ─ validate │ │ server.py ─ 16 tools │ │ tools/*.py ─ read+shape│ │ response.py ─ escape + │ │ structure │ └───────────┬──────────────┘ │ HTTPS, explicit │ KUBECONFIG only ┌───────────▼──────────────┐ │ Kubernetes API server │ │ ── RBAC boundary ── │ │ ServiceAccount: │ │ get/list/watch only │ └──────────────────────────┘

Configuration is validated once at startup. If anything is wrong — KUBECONFIG unset, the file unreadable or malformed, ALLOWED_NAMESPACES missing or containing a wildcard — the process writes one line to stderr and exits 1. It never starts in a partially-valid state.

Available Tools

Arguments marked ? are optional.

ToolDescriptionParameters
get_pod_statusPhase, conditions, container statuses, QoS class and node for a podpod_name, namespace
get_pod_logsRecent log lines from a pod container. Content is untrusted — see Reading get_pod_logs outputpod_name, namespace, container?, previous?, tail_lines?
get_pod_eventsRecent events for a pod, newest first, with total_availablepod_name, namespace
list_podsPods in a namespace with phase, restart count and readinessnamespace, label_selector?
get_node_statusConditions, capacity, allocatable, taints and roles for a nodenode_name
list_nodesCluster nodes with readiness, roles, age and kubelet versionnone
get_deployment_statusReplica counts, conditions and rollout strategydeployment_name, namespace
list_deploymentsDeployments in a namespace with replica counts and availabilitynamespace
get_statefulset_statusReplica counts, revisions and update strategystatefulset_name, namespace
get_daemonset_statusScheduling counts and update strategydaemonset_name, namespace
get_serviceType, ClusterIP, ports, selector and ready endpoint countservice_name, namespace
get_endpointsReady and not-ready endpoint addresses backing a serviceservice_name, namespace
get_pvc_statusPhase, capacity, binding and resize state for a PVCpvc_name, namespace
get_hpa_statusReplica bounds, current metrics and conditions for an HPAhpa_name, namespace
get_namespace_eventsRecent events across a namespace, newest first, with total_availablenamespace, limit?
list_namespacesThe namespaces this server is permitted to readnone

Every namespaced tool validates its namespace argument before making any API call, so a disallowed namespace produces a structured error and no network request.

Deliberately absent

No get_secrets, get_configmap, exec_into_pod, port_forward, or any create/update/patch/delete tool. These are excluded from all versions unless a new threat-model review is conducted and documented — they are not backlog items. The reasoning for each is in SECURITY.md.

Security model

Full detail is in SECURITY.md. The summary:

The boundary is Kubernetes RBAC

Everything this server does in application code is defense-in-depth. The enforcement boundary is the ServiceAccount's RBAC bindings. If the bindings grant more than intended, the application-layer allowlist is all that stands in the way, and it is not a boundary you should rely on.

Provisioning is split by scope so that the cluster-scoped grant is minimal:

ManifestScopeGrants
clusterrole.yaml + clusterrolebinding.yamlclusterget/list/watch on nodes and namespaces only
role.yamlnamespaceget/list/watch on the diagnostic resources
rolebinding.yaml.templatenamespacebinds the Role, one namespace at a time

Applying the cluster-scoped pair makes no namespace readable. A namespace becomes readable only when a Role *and* a RoleBinding exist in it. A namespace listed in ALLOWED_NAMESPACES but never bound stays unreadable — RBAC wins.

pods/log is granted in its own rule block, never folded into the pods rule, because Kubernetes subresources do not inherit from their parent.

Defense-in-depth layers
LayerWhat it doesWhat it is not
RBACGrants read verbs on diagnostic resources in bound namespaces only— this *is* the boundary
Explicit kubeconfigReads KUBECONFIG from an exact path; no ~/.kube/config, no in-cluster config, no fallback chainNot a permission check — it prevents silently picking up an ambient credential
Namespace allowlistRejects wildcards, strips kube-system/kube-public, validates before every callAdvisory; a bug here is contained by RBAC
Output escapingAll cluster-authored free text routed through serialize_log_contentPrevents breaking out of a JSON string; cannot stop a model acting on legible instructions
Structured errorsEvery failure returns a dict; no exception reaches the MCP layer—
Prompt injection is mitigated, not eliminated

Pod logs and event messages are written by workloads in the cluster. A container can print anything, including text shaped like instructions to the model reading it. Escaping keeps injected text inside its JSON string; it cannot stop a model from acting on instructions it reads as data. Treat tool output as untrusted input to whatever consumes it. This residual risk is accepted and documented.

Prerequisites

  1. A Kubernetes cluster and a kubectl context with enough permission to create a ServiceAccount, Role, RoleBinding, ClusterRole and ClusterRoleBinding — you need this once, to provision. The server itself never uses your admin credential.
  2. Kubernetes 1.24+ — scripts/generate-kubeconfig.sh mints a token via the TokenRequest API, not a legacy auto-mounted Secret.
  3. Python 3.11+
  4. uv — curl -LsSf https://astral.sh/uv/install.sh | sh (or use Docker, which needs neither Python nor uv on the host)

Setup

git clone https://github.com/NanaGyamfiPrempeh30/k8s-troubleshoot-mcp.git

cd k8s-troubleshoot-mcp

Install dependencies (uv creates .venv automatically)

uv sync

Run the test suite

uv run pytest tests/ -q

Provision RBAC and mint a kubeconfig
scripts/generate-kubeconfig.sh /secure/path/k8s-mcp-kubeconfig.yaml staging production

The first argument is where to write the kubeconfig; the rest are the namespaces the server may read. Pass the same set you intend to put in ALLOWED_NAMESPACES — RBAC is the enforcement boundary, and a namespace bound here but absent from the allowlist (or the reverse) is a mismatch between real permission and configured capability.

The script applies the cluster-scoped manifests together, then applies role.yaml with an explicit -n and renders a RoleBinding per namespace. On success it prints the kubeconfig path to stdout and nothing else; all diagnostics go to stderr. It also asserts after provisioning that kubectl auth can-i get secrets returns no, and aborts if it does not.

Do not run `kubectl apply -f kubernetes/`. It does not fail — it reports

success while creating role.yaml in the *current* namespace and skipping

rolebinding.yaml.template entirely, because kubectl apply -f only

reads .yaml/.yml/.json. The result is a server that looks provisioned

and can read nothing. Verified against a v1.35 API server with

--dry-run=server: 5 resources applied, not 6.

The generated kubeconfig is written with umask 077 and chmod 600. Keep it out of the repository — the script warns if the output path is inside a repository and not covered by .gitignore.

Run it
KUBECONFIG=/secure/path/k8s-mcp-kubeconfig.yaml \

ALLOWED_NAMESPACES=staging,production \ uv run k8s-troubleshoot-mcp

The server speaks JSON-RPC on stdin/stdout, so it will appear to hang — that is correct. It is waiting for a client.

Connecting to Claude Desktop

Add to claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{

"mcpServers": { "k8s-troubleshoot": { "command": "uv", "args": ["run", "k8s-troubleshoot-mcp"], "cwd": "/path/to/k8s-troubleshoot-mcp", "env": { "KUBECONFIG": "/secure/path/k8s-mcp-kubeconfig.yaml", "ALLOWED_NAMESPACES": "staging,production" } } } }

Restart Claude Desktop fully (quit from the system tray, reopen), then check Settings → Developer → k8s-troubleshoot shows running.

On Windows, if the server shows as disconnected, use a batch file wrapper — Claude Desktop has working-directory issues with direct interpreter invocation:

@echo off

cd /d C:\Users\YourUsername\k8s-troubleshoot-mcp uv run k8s-troubleshoot-mcp

{

"mcpServers": { "k8s-troubleshoot": { "command": "cmd.exe", "args": ["/c", "C:\\Users\\YourUsername\\k8s-troubleshoot-mcp\\run_mcp.bat"], "env": { "KUBECONFIG": "C:\\secure\\path\\k8s-mcp-kubeconfig.yaml", "ALLOWED_NAMESPACES": "staging,production" } } } }

Running with Docker

docker build -t k8s-troubleshoot-mcp .

docker run -i --rm \ -v /secure/path/k8s-mcp-kubeconfig.yaml:/kubeconfig:ro \ -e KUBECONFIG=/kubeconfig \ -e ALLOWED_NAMESPACES=staging,production \ k8s-troubleshoot-mcp

-i is required — JSON-RPC travels on stdin/stdout. :ro is not decoration: this server performs no writes of any kind, so a writable mount would grant privilege it has no use for.

The image runs as non-root, UID 10001, and contains no c

ตัดมาแค่ช่วงต้น อ่านต่อใน repo