The container logs were silent, but the error was real. One command could fix it: ffmpeg. Another could run it where it mattered: kubectl.
Running FFmpeg inside a Kubernetes cluster is straightforward, but small mistakes cost hours. You need a container image that includes FFmpeg, pods configured for CPU or GPU acceleration, and seamless control through kubectl. This pairing makes video processing, format conversion, and livestream piping possible at scale without leaving your cluster.
Start with a Dockerfile. Use a base like jrottenberg/ffmpeg or build from scratch with only the codecs you need. Keep the image small. Once built, push it to your registry. With kubectl, create a Deployment or Job manifest that points to this image. Set resource requests high enough for smooth encoding. For GPU workloads, add node selectors and the NVIDIA device plugin.
Streaming workloads need persistent containers. Use a Deployment for long-running pods and connect them to your storage claims or streaming endpoints. Batch work like transcoding archives fits a Job or CronJob. Always check kubectl logs for FFmpeg output and errors. Probe readiness with a lightweight script or the Kubernetes readinessProbe to keep bad pods out of rotation.