Skip to main content
Version: v2.9 (Preview)

Adding a Sidecar

A sidecar is a container that extends or enhances the main container in a pod. The main container and the sidecar share a pod, and therefore share the same network space and storage. You can add sidecars to existing workloads by using the Add a Sidecar option.

  1. In the upper left corner, click ☰ > Cluster Management.

  2. Go to the cluster where you want to add a sidecar and click Explore.

  3. In the left navigation bar, click Workload.

  4. Find the workload that you want to extend. Select ⋮ > + Add Sidecar.

  5. Enter a Name for the sidecar.

  6. In the General section, select a sidecar type. This option determines if the sidecar container is deployed before or after the main container is deployed.

    • Standard Container:

      The sidecar container is deployed after the main container.

    • Init Container:

      The sidecar container is deployed before the main container.

  7. From the Container Image field, enter the name of the container image that you want to deploy in support of the main container. During deployment, Rancher pulls this image from Docker Hub. Enter the name exactly as it appears on Docker Hub.

  8. Set the remaining options. You can read about them in Deploying Workloads.

  9. Click Launch.

Result: The sidecar is deployed according to your parameters. Following its deployment, you can view the sidecar by selecting ⋮ icon (...) > Edit for the main deployment.