k8s-pod-autostart
CommunityAuto-restart services in systemdless pods.
Software Engineering#kubernetes#supervisor#s6-overlay#healthz#pod recovery#bashrc autostart#livenessProbe
Authorsaintgo7
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves the problem of Kubernetes pods failing to automatically start or recover user services after a reboot or redeploy when systemd, cron, or init tools are unavailable.
Core Features & Use Cases
- s6-overlay cont-init hook pattern: Restarts a target service right after PID 1 comes up (best fit for s6-based images) using an ephemeral hook at /etc/cont-init.d/03-<service>.
- .bashrc one-shot interactive autostart pattern: Starts the service on the first interactive login only (PS1-gated) using flock plus a per-boot stamp to prevent duplicate launches.
- Healthz-driven recovery: Uses readiness/health checks (healthz URL) so the supervisor starts only when the stack is actually down.
- Operational fit: Works for common dev and Jupyter/code-server style containers where users want automatic vLLM/FastAPI/Admin/Gateway restoration without manual intervention.
Quick Start
Ask the assistant to guide you to install the skill by running install.sh with your service name and supervisor start command so the pod can auto-start after reboot.
Dependency Matrix
Required Modules
bashcurlflockstatchmodsetsidnohup
Components
scriptsassets
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: k8s-pod-autostart Download link: https://github.com/saintgo7/claude-skills/archive/main.zip#k8s-pod-autostart Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.