<p>I am working on a use case where sidecar container runs a shell script continuously  on changes directory permission of main container.
I want to Start side container only after Main Container in pod is ready .</p>
<p>I was looking at Init Containers and what I could see is init containers are good candidate when we have inter-pod dependency (pod A starts only after Pod B has started/healthy).</p>
<p>In my case I need container B to start only after Container A is started in the same Pod.</p>
<p>Deployment.yaml for refrence</p>
<pre><code>     containers:
    - name: {{ .Chart.Name }}
      securityContext:
        {{- toYaml .Values.securityContext | nindent 12 }}
      image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}&quot;
      imagePullPolicy: {{ .Values.image.pullPolicy }}
   - name: container2
      image: some-repo
      imagePullPolicy: {{ .Values.image.pullPolicy }}
</code></pre>

<p>I am not aware of any K8s native feature or hook that satisfies the use case you describe.</p>
<p>I would solve it like this:</p>
<p>Run your sidecar container within the same Pod as a regular container and get it to executes a script that pings the readiness endpoint of your application container before proceeding to check directory permissions.</p>
