Cron Jobs in Kubernetes - connect to existing Pod, execute script
问题 I'm certain I'm missing something obvious. I have looked through the documentation for ScheduledJobs / CronJobs on Kubernetes, but I cannot find a way to do the following on a schedule: Connect to an existing Pod Execute a script Disconnect I have alternative methods of doing this, but they don't feel right. Schedule a cron task for: kubectl exec -it $(kubectl get pods --selector=some-selector | head -1) /path/to/script Create one deployment that has a "Cron Pod" which also houses the