title: How do I login into a Docker container running inside the specific Kubernetes pod and run an test.sh file?
body: <p>I have a test.sh file which need to be run in an docker container which runs inside the Kubernetes pods via Jenkins job.</p>
  
  <p>Flow: </p>
  
  <p>Step1 : Run a Jenkins job which should login to a docker container running inside the pods</p>
  
  <p>Step: From the container execute the test.sh script.</p>
  
  <p>test.sh</p>
  
  <p>echo "This is demo file"</p>
  
  <p>I have a command which will give docker image running in a kubenertes pods</p>
  
  <p><code>kubectl get pods -n eum -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" -l app=${TIER}</code></p>
  
  <p>TIER = list of apps added in jenkins as choice parameter</p>
  
  <p>I wanted to login to the container and run the test.sh script</p>