Skip to content

Template devcontainer with Minikube for safely running an agent’s commands in isolation.

License

Notifications You must be signed in to change notification settings

zAbuQasem/agents-devcontainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agents Devcontainer

Template devcontainer with Minikube for safely running an agent’s commands in isolation. React frontend + FastAPI backend are exposed via NodePort for easy local access; everything lives inside the devcontainer and local Minikube so the agent cannot affect your host.

What’s in the box

  • Devcontainer with Minikube, kubectl, Helm, Docker, Node 20, Python 3.13
  • React frontend (NodePort 30081) and FastAPI backend (NodePort 30080)
  • Local port-forward helper (make forward) to reach the app at localhost:3000 (frontend) and localhost:8000 (backend)
  • Images are built locally and loaded into Minikube; no external registry required

Why it’s a safe agent sandbox

  • The agent runs entirely inside the devcontainer; Minikube is inside Docker-in-Docker, so scope is limited
  • No host file edits or external ingress needed; access uses Minikube IP + NodePorts
  • Make targets are constrained to cluster lifecycle, image build/load, and port forwarding

Quick setup

  1. Start/verify the cluster: make setup
  2. Build, load, deploy: make deploy
  3. Get access info: make expose (or minikube ip -p devcontainer)
  4. Optional: port-forward to localhost: make forward (frontend 3000, backend 8000)

Access via Minikube IP:

  • Frontend: http://<MINIKUBE_IP>:30081
  • Backend: http://<MINIKUBE_IP>:30080

Using the agent

  • The agent should run make (default help) to see allowed commands.
  • Typical flow for the agent:
    1. make setup
    2. make deploy
    3. make expose to learn IP/ports, or make forward if localhost access is needed
  • Backend endpoints the agent can call:
    • Health: http://<MINIKUBE_IP>:30080/healthz
    • Quote: http://<MINIKUBE_IP>:30080/quote
  • In-cluster addressing for agent code or jobs: http://backend and http://frontend.

Useful Make Targets

  • make / make help — list available targets
  • make setup — ensure Minikube is up
  • make deploy — build, load, apply manifests
  • make forward — port-forward to localhost (frontend 3000, backend 8000)
  • make expose — print NodePort URLs with Minikube IP
  • make undeploy — delete k8s resources
  • make setup-clean — delete the Minikube cluster

About

Template devcontainer with Minikube for safely running an agent’s commands in isolation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors