<p>I am running my JMeter on Azure Kubernetes for load testing. JMeter uses HTTP sampler to call Azure function( HTTP endpoint) to generate load.
I am getting error message <strong>Response code:Non HTTP response code: java.net.UnknownHostException Response message:Non HTTP response message: abcd.azurewebsites.net.</strong> on kubernetes.</p>
<p>I ran my JMeter test in Azure virtual machine and I am not getting any issue.
I am using same test plan (jmx file) for both Kuberenetes and virtual machine and same Azure function is used in both cases.</p>
<p>Please let me know why getting error <strong>Response code:Non HTTP response code: java.net.UnknownHostException Response message:Non HTTP response message: abcd.azurewebsites.net</strong> when running on Kubernetes.</p>
<p>I am using following configurations</p>
<ol>
<li>JMeter - 5.2.1</li>
<li>Kubernetes - 1.19.9</li>
<li>Jmx file has 150 threads</li>
</ol>
<p>Regards,
Amit Agrawal</p>

<p>I doubt that this is a JMeter problem, most probably your pod doesn't have the Internet access for some reason, you might want to get familiarized with the following materials:</p>
<ul>
<li><a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#check-required-ports" rel="nofollow noreferrer">Check required ports</a></li>
<li><a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">Debugging DNS Resolution</a></li>
</ul>
<p>However if JMeter is the only piece of software having this problem you might want to <a href="https://www.blazemeter.com/blog/how-to-configure-jmeter-logging" rel="nofollow noreferrer">increase JMeter's logging verbosity</a> for HTTP protocol by adding the next lines to <em>log4j2.xml</em> file:</p>
<pre><code>&lt;Logger name=&quot;org.apache.http&quot; level=&quot;debug&quot; /&gt;
&lt;Logger name=&quot;org.apache.http.wire&quot; level=&quot;error&quot; /&gt;
&lt;Logger name=&quot;org.apache.jmeter.protocol.http&quot; level=&quot;debug&quot; /&gt;
</code></pre>
<p>One of the possible reasons is that locally you <a href="https://jmeter.apache.org/usermanual/get-started.html#proxy_server" rel="nofollow noreferrer">configured JMeter to use your corporate proxy for accessing the Internet</a> and by accident forgot to remove this settings for your k8s deployment</p>
