A `container('kaniko')` step fails: `sh: can't access tty; job control turned off` then `/busybox/sh: kubectl: not found`, or `ERROR: Process exited immediately after creation`
IntermediateTroubleshootingPlugins, JCasC & Kubernetes agents
Answer
Likely causes → The container's main process exits (no sleep/cat command), or a distroless image lacks a shell; the wrong container was targeted.
Diagnose → Check pod status (container terminated), the image entrypoint, and the container name in container().
Fix → Use gcr.io/kaniko-project/executor:debug (includes busybox shell) with command: ["sleep"], args: ["infinity"]; target the correct container for each tool.
Prevent → Reusable templates with a known-good command for each tool image.
More on Plugins, JCasC & Kubernetes agents
Startup log: `SEVERE: Failed Loading plugin Pipeline: Groovy v... (workflow-cps)` with `Update required: Pipeline: Supporting APIs (workflow-support) ... to be updated to ... or higher`IntermediatePlugin fails with `Jenkins (2.426.3) or higher required`BeginnerJCasC fails at startup: `io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class jenkins.model.Jenkins : agentProtocols`Intermediate`io.jenkins.plugins.casc.UnknownConfiguratorException: No configurator for the following root elements: sonarGlobalConfiguration`IntermediateJCasC credentials contain the literal text `${GITHUB_TOKEN}` instead of the valueAdvancedKubernetes plugin: `Failure executing: POST at: https://10.96.0.1/api/v1/namespaces/jenkins-agents/pods. Message: pods is forbidden: User "system:serviceaccount:jenkins:jenkins" cannot create resource "pods" in API group "" in the namespace "jenkins-agents".`Beginner