I have an example of running jenkins pipelines on kubernetes where every step is executed in separate container.
By default the first container (first of 3/3) is the jenkins slave and the rest can be defined in the pipeline. In my example the other two containers are ‘tf’ running terraform (default if step doesn’t define which container to run within) and ‘ansible’ with just ansible.
Pod manifest lives inside yaml file, declaring where to pull images from and what secret to use in the case of private registry
The steps in the example include ‘sleep’ command for demonstration purpose.