<p>I'm doing a perf test for web server which is deployed on <code>EKS cluster</code>. I'm invoking the server using <code>jmeter</code> with different conditions (like varying thread count, payload size, etc..).
So I want to record <code>kubernetes</code> perf data with the timestamp so that I can analyze these data with my jmeter output (<code>JTL</code>).</p>
<p>I have been digging through the internet to find a way to record <code>kubernetes</code> <code>perf</code> data. But I was unable to find a proper way to do that.</p>
<p>Can experts please provide me a standard way to do this??</p>
<p>Note: I have a multi-container pod also.</p>

Vajira Prabuddhaka
<p>In line with @Jonas comment</p>
<p>This is the quickest way of installing Prometheus in you K8 cluster. Added Details in the answer as it was impossible to put the commands in a readable format in Comment.</p>
<ol>
<li>Add bitnami helm repo.</li>
</ol>
<pre><code>helm repo add bitnami https://charts.bitnami.com/bitnami
</code></pre>
<ol start="2">
<li>Install helmchart for promethus</li>
</ol>
<pre><code>helm install my-release bitnami/kube-prometheus
</code></pre>
<p>Installation output would be:</p>
<pre><code>C:\Users\ameena\Desktop\shine\Article\K8\promethus&gt;helm install my-release bitnami/kube-prometheus
NAME: my-release
LAST DEPLOYED: Mon Apr 12 12:44:13 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **

Watch the Prometheus Operator Deployment status using the command:

    kubectl get deploy -w --namespace default -l app.kubernetes.io/name=kube-prometheus-operator,app.kubernetes.io/instance=my-release

Watch the Prometheus StatefulSet status using the command:

    kubectl get sts -w --namespace default -l app.kubernetes.io/name=kube-prometheus-prometheus,app.kubernetes.io/instance=my-release

Prometheus can be accessed via port &quot;9090&quot; on the following DNS name from within your cluster:

    my-release-kube-prometheus-prometheus.default.svc.cluster.local

To access Prometheus from outside the cluster execute the following commands:

    echo &quot;Prometheus URL: http://127.0.0.1:9090/&quot;
    kubectl port-forward --namespace default svc/my-release-kube-prometheus-prometheus 9090:9090

Watch the Alertmanager StatefulSet status using the command:

    kubectl get sts -w --namespace default -l app.kubernetes.io/name=kube-prometheus-alertmanager,app.kubernetes.io/instance=my-release

Alertmanager can be accessed via port &quot;9093&quot; on the following DNS name from within your cluster:

    my-release-kube-prometheus-alertmanager.default.svc.cluster.local

To access Alertmanager from outside the cluster execute the following commands:

    echo &quot;Alertmanager URL: http://127.0.0.1:9093/&quot;
    kubectl port-forward --namespace default svc/my-release-kube-prometheus-alertmanager 9093:9093

</code></pre>
<ol start="4">
<li>Follow the commands to forward the UI to localhost.</li>
</ol>
<pre><code>echo &quot;Prometheus URL: http://127.0.0.1:9090/&quot;
    kubectl port-forward --namespace default svc/my-release-kube-prometheus-prometheus 9090:9090
</code></pre>
<ol start="5">
<li><p>Open the UI in browser: <a href="http://127.0.0.1:9090/classic/graph" rel="nofollow noreferrer">http://127.0.0.1:9090/classic/graph</a></p>
</li>
<li><p>Annotate the pods for sending the metrics.</p>
</li>
</ol>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 4 # Update the replicas from 2 to 4
  template:
    metadata:
      labels:
        app: nginx
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9102'
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
</code></pre>
<ol start="7">
<li>In the ui put appropriate filters and start observing the crucial parameter such as memory CPU etc. UI supports autocomplete so it will not be that difficult to figure out things.</li>
</ol>
<p>Regards</p>
