<p>I have a pod and a service, basically the problem is that I want the traffic to port 11010/TCP to arrive with a delay for testing purpose:</p>
<p>NAME                                         READY       STATUS     RESTARTS   AGE<br />
pod/regression                       1/1     Running     0          6m58s</p>
<p>NAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)<br />
service/regression   ClusterIP   some_ip           <strong>11001/TCP,8080/TCP,8081/TCP,11010/TCP</strong>   6m59s</p>
<p>Is any possible way of doing it with k8s like:</p>
<pre><code>    ---
        apiVersion: v1
        kind: Service
        metadata:
          name: regression
        spec:
          ports:
            - name: port-11010
              port: 11010
              targetPort: 11010
              protocol: TCP
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;    delay: 10ms    &lt;&lt;&lt;&lt;&lt;&lt;
          selector:
            service: regression
        status:
          loadBalancer: {}
</code></pre>

<p>there is no straightaway solution to this..
but you can use service mesh to achieve this..
I am familiar with istio (not sure with any other service mesh solution) and this could give some idea on how to achieve your query
<a href="https://istio.io/latest/docs/tasks/traffic-management/fault-injection/" rel="nofollow noreferrer">https://istio.io/latest/docs/tasks/traffic-management/fault-injection/</a></p>
