<p>I just want to know whether I can run Karate test in a pod. Or is there any good suggestion on how to run it?</p>

<p>I tried to run the Karate test in terminal and it works. Just want to know if I can run it from Kubernetes pod. Nginx also running in the pod.</p>

Chxk
<p>Posting as Community Wiki for future use.</p>

<p>@Harsh Manvar provided good example, however if you will just build it from Dockerfile, you will recieved errors. You have to download all files mentioned in <a href="https://github.com/neillfontes/karate-sample" rel="nofollow noreferrer">Github</a>. Correct oreder will be:</p>

<pre><code>$ git clone https://github.com/neillfontes/karate-sample.git
$ cd karate-sample
$ docker build -t karate_docker .
</code></pre>

<p>After image was built you can check it:</p>

<pre><code>$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED              SIZE
karate_docker       latest              9dc6d7a5278a        About a minute ago   136MB
</code></pre>

<p>Later you can start testing using:</p>

<pre><code>$ docker run karate_docker
START: Running tests...

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running demo.DemoTest
11:57:49.684 [main] DEBUG c.i.karate.cucumber.CucumberRunner - init test class: class demo.DemoTest
11:57:50.412 [main] DEBUG c.i.karate.cucumber.CucumberRunner - loading feature: /usr/src/app/target/test-classes/demo/features/get-token.feature
11:57:50.663 [main] DEBUG c.i.karate.cucumber.CucumberRunner - loading feature: /usr/src/app/target/test-classes/demo/features/make-request.feature
11:57:53.898 [main] INFO  com.intuit.karate.ScriptBridge - karate.env system property was: null
11:57:54.867 [main] DEBUG c.i.k.h.a.RequestLoggingInterceptor -
1 &gt; POST http://brentertainment.com/oauth2/lockdin/token
1 &gt; Accept-Encoding: gzip,deflate
1 &gt; Connection: Keep-Alive
1 &gt; Content-Length: 96
</code></pre>
