ใช้ทำอะไรได้
ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ
- ต่อแบบ ติดตั้งในเครื่อง
- บัญชีหรือคีย์ ไม่ต้องใส่คีย์ · ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES)
- หมวด เครื่องมือนักพัฒนา
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.ใช้คู่กับ
Skill ที่สอน AI ทำงานแบบนี้ ใช้ร่วมกับตัวนี้ได้
andrej-karpathy-skills
andrej-karpathy-skills เป็นไฟล์ CLAUDE.md ไฟล์เดียวที่ใช้ปรับพฤติกรรมของ Claude Code ให้ดีขึ้น โดยอ้างอิงจากข้อสังเกตของ Andrej Karpathy เกี่ยวกับข้อผิดพลาดที่พบบ่อยเมื่อ LLM เขียนโค้ด
ทำไมอยู่อันดับนี้
หน้ารายการเรียงด้วยคะแนนการใช้งาน (เต็ม 100) จากส่วนเหล่านี้
| ความนิยม | 0/80 | ดาว GitHub หรือยอดดาวน์โหลดต่อสัปดาห์ ค่ามากนับ 60 ค่าน้อยนับ 20 |
|---|---|---|
| ความสด | 7/12 | ออกรุ่นหรือแก้โค้ดใน 30 วัน ได้เต็ม |
| ระบบยังตอบ | 0/8 | endpoint บนคลาวด์ตอบตอนตรวจล่าสุด |
| คะแนนการใช้งาน | 7/100 |
คุณภาพ: ผลตรวจเบื้องต้นผ่าน 3/3 ข้อ (แสดงให้ดู ไม่ได้ใช้เรียง) · ความมาแรง: ยังไม่มีข้อมูล (ใช้เรียงเฉพาะแท็บมาแรง)
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ
ขั้นแรก: คุณใช้ AI ตัวไหน
เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง
ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน
ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
ลง 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
ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น:
docker --versionลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker
กรอกค่าตั้ง 2 ช่อง
ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย
KUBECONFIGพาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว· ค่าเริ่มต้น /kubeconfigดูต้นฉบับภาษาอังกฤษ
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_NAMESPACESnamespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น 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…
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
เปิดไฟล์ตั้งค่าของแอป Claude บนคอม
SettingsDeveloperEdit Config
วางค่าตั้งนี้แล้วบันทึกไฟล์
กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน
ปิดแอป Claude แล้วเปิดใหม่
ลองเลย
ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)
คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ
LOG_LEVELDEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ· ค่าเริ่มต้น INFOดูต้นฉบับภาษาอังกฤษ
DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.API_TIMEOUT_SECONDSการหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก· ค่าเริ่มต้น 30ดูต้นฉบับภาษาอังกฤษ
Kubernetes API request timeout. Must be a positive integer.MAX_LOG_LINESจำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน· ค่าเริ่มต้น 200ดูต้นฉบับภาษาอังกฤษ
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.
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ 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 ได้
เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน
ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
ลง 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
ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น:
docker --versionลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker
กรอกค่าตั้ง 2 ช่อง
ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย
KUBECONFIGพาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว· ค่าเริ่มต้น /kubeconfigดูต้นฉบับภาษาอังกฤษ
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_NAMESPACESnamespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น 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…
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
เปิด Terminal
Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell
วางคำสั่งนี้แล้วกด Enter
กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน
พิมพ์ /mcp ใน Claude Code
ต้องเห็น Kubernetes Troubleshoot ในรายการและขึ้นว่าเชื่อมต่อแล้ว
ลองเลย
ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude Code บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)
คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ
LOG_LEVELDEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ· ค่าเริ่มต้น INFOดูต้นฉบับภาษาอังกฤษ
DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.API_TIMEOUT_SECONDSการหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก· ค่าเริ่มต้น 30ดูต้นฉบับภาษาอังกฤษ
Kubernetes API request timeout. Must be a positive integer.MAX_LOG_LINESจำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน· ค่าเริ่มต้น 200ดูต้นฉบับภาษาอังกฤษ
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.
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน
ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
ลง 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
ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น:
docker --versionลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker
กรอกค่าตั้ง 2 ช่อง
ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย
KUBECONFIGพาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว· ค่าเริ่มต้น /kubeconfigดูต้นฉบับภาษาอังกฤษ
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_NAMESPACESnamespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น 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…
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
กดปุ่มนี้เพื่อเปิด Cursor
กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน
ใส่คีย์ในช่องที่ว่างไว้
ในค่าตั้งของ Kubernetes Troubleshoot ช่อง KUBECONFIG, ALLOWED_NAMESPACES ยังว่าง ใส่คีย์ของคุณแล้วบันทึก
เปิดแชตของ AI ใน Cursor โหมด Agent
ลองเลย
ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Cursor บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)
คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ
LOG_LEVELDEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ· ค่าเริ่มต้น INFOดูต้นฉบับภาษาอังกฤษ
DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.API_TIMEOUT_SECONDSการหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก· ค่าเริ่มต้น 30ดูต้นฉบับภาษาอังกฤษ
Kubernetes API request timeout. Must be a positive integer.MAX_LOG_LINESจำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน· ค่าเริ่มต้น 200ดูต้นฉบับภาษาอังกฤษ
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.
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน
ต้องกรอกค่าตั้ง 2 ช่อง (KUBECONFIG, ALLOWED_NAMESPACES) · ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
ลง 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
ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น:
docker --versionลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Docker
กรอกค่าตั้ง 2 ช่อง
ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย
KUBECONFIGพาธไปยังไฟล์ kubeconfig ภายในคอนเทนเนอร์ ต้องตรงกับปลายทางของการ mount ไม่มีการย้อนกลับไปใช้ /.kube/config และไม่มี in-cluster config หากไฟล์หายไป อ่านไม่ได้ หรือมีรูปแบบผิดพลาด การเริ่มต้นระบบจะล้มเหลว· ค่าเริ่มต้น /kubeconfigดูต้นฉบับภาษาอังกฤษ
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_NAMESPACESnamespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น 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…
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
กดปุ่มนี้เพื่อเปิด VS Code
กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน
ใส่คีย์ในช่องที่ว่างไว้
ในค่าตั้งของ Kubernetes Troubleshoot ช่อง KUBECONFIG, ALLOWED_NAMESPACES ยังว่าง ใส่คีย์ของคุณแล้วบันทึก
เปิดแชตของ AI ใน VS Code โหมด Agent
ลองเลย
ใช้ Kubernetes Troubleshoot บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า VS Code บอกว่ากำลังใช้ Kubernetes Troubleshoot หรือมีชื่อเครื่องมือของ Kubernetes Troubleshoot ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ค่าตั้งเพิ่มเติม 3 ช่อง (ไม่ต้องกรอกก็ใช้ได้)
คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ
LOG_LEVELDEBUG, INFO, WARNING หรือ ERROR บันทึกทั้งหมดจะส่งไปยัง stderr เท่านั้น stdout ใช้สำหรับสตรีม JSON-RPC แบบเฉพาะ· ค่าเริ่มต้น INFOดูต้นฉบับภาษาอังกฤษ
DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.API_TIMEOUT_SECONDSการหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวก· ค่าเริ่มต้น 30ดูต้นฉบับภาษาอังกฤษ
Kubernetes API request timeout. Must be a positive integer.MAX_LOG_LINESจำนวนบรรทัดบันทึกสูงสุดที่การเรียก get_pod_logs แต่ละครั้งอาจส่งคืน ต้องเป็นจำนวนเต็มบวก และจำกัดไว้ที่เพดานสูงสุด 1000 พร้อมคำเตือน· ค่าเริ่มต้น 200ดูต้นฉบับภาษาอังกฤษ
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.
คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม
ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง
สำหรับคนเขียนโค้ด: คำสั่ง 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จำเป็น envnamespace ที่คั่นด้วยจุลภาคซึ่งเซิร์ฟเวอร์อ่านได้ เช่น 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_LEVELenvDEBUG, 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_SECONDSenvการหมดเวลาของคำขอ API ของ Kubernetes ต้องเป็นจำนวนเต็มบวกดูต้นฉบับภาษาอังกฤษ
Kubernetes API request timeout. Must be a positive integer.MAX_LOG_LINESenvจำนวนบรรทัดบันทึกสูงสุดที่การเรียก 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 บนอินเทอร์เน็ต
ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด
สำหรับผู้ทำ: ติดป้ายใน README
ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้
[](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.
Appllama
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
Cloudflare MCP
Cloudflare MCP servers
Omnara
Deploy durable AI agents with Omnara, an open-source managed-agent platform.
Repowise
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
| ตัวนี้ Kubernetes Troubleshoot | GitDiagram | Appllama | Cloudflare MCP | Omnara | Repowise | |
|---|---|---|---|---|---|---|
| ทำงานที่ไหน | ต้องลงในเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | มีทั้งบนคลาวด์และแบบลงเครื่อง |
| ต้องใส่คีย์ | ไม่ | ไม่ | ไม่ | ไม่ | ไม่ | ไม่ |
| กด + ใน Claude ได้ | ไม่ | ไม่ | ไม่ | ใช่ | ไม่ | ไม่ |
| ผลตรวจเบื้องต้น | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 5/5 |
| สัญญาอนุญาต | MIT | MIT | MIT | Apache-2.0 | Apache-2.0 | AGPL-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
checkoutpod instagingnot ready?" - "Show me the last 50 lines of logs from the
apicontainer" - "Which nodes are not Ready, and what are their taints?"
- "Is the
webHPA scaling, and what does its current metric say?" - "What events fired in
productionin 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.
| Tool | Description | Parameters |
|---|---|---|
get_pod_status | Phase, conditions, container statuses, QoS class and node for a pod | pod_name, namespace |
get_pod_logs | Recent log lines from a pod container. Content is untrusted — see Reading get_pod_logs output | pod_name, namespace, container?, previous?, tail_lines? |
get_pod_events | Recent events for a pod, newest first, with total_available | pod_name, namespace |
list_pods | Pods in a namespace with phase, restart count and readiness | namespace, label_selector? |
get_node_status | Conditions, capacity, allocatable, taints and roles for a node | node_name |
list_nodes | Cluster nodes with readiness, roles, age and kubelet version | none |
get_deployment_status | Replica counts, conditions and rollout strategy | deployment_name, namespace |
list_deployments | Deployments in a namespace with replica counts and availability | namespace |
get_statefulset_status | Replica counts, revisions and update strategy | statefulset_name, namespace |
get_daemonset_status | Scheduling counts and update strategy | daemonset_name, namespace |
get_service | Type, ClusterIP, ports, selector and ready endpoint count | service_name, namespace |
get_endpoints | Ready and not-ready endpoint addresses backing a service | service_name, namespace |
get_pvc_status | Phase, capacity, binding and resize state for a PVC | pvc_name, namespace |
get_hpa_status | Replica bounds, current metrics and conditions for an HPA | hpa_name, namespace |
get_namespace_events | Recent events across a namespace, newest first, with total_available | namespace, limit? |
list_namespaces | The namespaces this server is permitted to read | none |
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:
| Manifest | Scope | Grants |
|---|---|---|
clusterrole.yaml + clusterrolebinding.yaml | cluster | get/list/watch on nodes and namespaces only |
role.yaml | namespace | get/list/watch on the diagnostic resources |
rolebinding.yaml.template | namespace | binds 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
| Layer | What it does | What it is not |
|---|---|---|
| RBAC | Grants read verbs on diagnostic resources in bound namespaces only | — this *is* the boundary |
| Explicit kubeconfig | Reads KUBECONFIG from an exact path; no ~/.kube/config, no in-cluster config, no fallback chain | Not a permission check — it prevents silently picking up an ambient credential |
| Namespace allowlist | Rejects wildcards, strips kube-system/kube-public, validates before every call | Advisory; a bug here is contained by RBAC |
| Output escaping | All cluster-authored free text routed through serialize_log_content | Prevents breaking out of a JSON string; cannot stop a model acting on legible instructions |
| Structured errors | Every 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
- A Kubernetes cluster and a
kubectlcontext 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. - Kubernetes 1.24+ —
scripts/generate-kubeconfig.shmints a token via the TokenRequest API, not a legacy auto-mounted Secret. - Python 3.11+
- 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.yamlin the *current* namespace and skipping
rolebinding.yaml.templateentirely, becausekubectl apply -fonly
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