k8s-exec

Execute SQL and Python code inside Kubernetes pods via psql or Django shell.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/nclandrei/dotfiles --skill k8s-exec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-exec
Source: https://github.com/nclandrei/dotfiles/tree/main/config/skills/k8s-exec
Command: npx skills add https://github.com/nclandrei/dotfiles --skill k8s-exec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes environments often require executing dynamic commands directly inside pods for database checks or app-level scripts. This Skill provides a safe, repeatable way to run SQL via psql or Python code via Django shell without building custom containers or manually connecting.

Core Features & Use Cases

  • Run SQL queries directly in Kubernetes pods using psql or Django dbshell.
  • Execute Python code against a Django app inside a carta-web pod for ORM checks.
  • Automated pod discovery and environment resolution with safeguards to avoid production.

Quick Start

Run a sample SQL query with -q or a small Python command with --python in your target namespace to verify access.

Frequently Asked Questions about k8s-exec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run SQL queries inside a Kubernetes pod without manual kubectl exec?

Run SQL queries directly inside Kubernetes pods using psql or Django dbshell with automated pod discovery and environment resolution. This Skill executes database validation commands dynamically without building custom containers or manually connecting to the cluster.

Can I execute Django shell Python code on a Kubernetes pod for ORM checks?

Yes, you can execute Python code against a Django app inside a carta-web pod for ORM checks. The Skill runs Python commands via Django shell to validate application logic quickly within your target namespace.

Do I need kubectl installed to run database checks on Kubernetes pods?

Yes, kubectl and a running Kubernetes cluster are required to execute database checks. The Skill relies on kubectl to interact with pods and automatically resolves the target environment for your SQL or Python commands.

What safeguards prevent accidentally running SQL queries on production Kubernetes pods?

The Skill includes safeguards that block production environments by default, automatically targeting safe application pods when available. This ensures database validation and script execution remain isolated from production workloads.

What is the best way to validate application logic in a Kubernetes environment?

Validate application logic by executing Python code through Django shell directly inside pods. This approach provides a repeatable way to run app-level scripts for ORM checks without manually connecting or building custom containers.

Why does automated pod discovery matter for running SQL in Kubernetes?

Automated pod discovery resolves the correct target pod and environment dynamically, eliminating manual lookup. This allows you to run SQL via psql or Django dbshell safely and repeatable across different namespaces.