<p>Currently I run a curl container and directly connect with its terminal to verify connectivity to services and check we can can connect on some port to an external service or a service maintained by some other team.</p>
<pre><code>kubectl run curl -it --rm --image=curlimages/curl -- sh
</code></pre>
<p>Now the problem is that I have to run a curl container on a Node that has taints and tolerations enabled. Is there a way to run this container on by providing tolerations from the kubectl cli?</p>
<p>For reference I am using AKS service and we use helm for deployment. In order to schedule workloads on the tainted nodes we use a combination of telerations and nodeaffinity in combination. Configs given below.</p>
<pre><code>  spec:
      tolerations:
        - key: &quot;mendix&quot;
          operator: &quot;Equal&quot;
          value: &quot;true&quot;
          effect: &quot;NoSchedule&quot;
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: appType
                operator: In
                values:
                - mendix
</code></pre>

<p>You can do something like this, if you need to run it on a specific node that is tainted (it will run despite any taints):</p>
<pre><code>kubectl run curl -it --rm --image=curlimages/curl --overrides \
  '{&quot;spec&quot;:{&quot;tolerations&quot;:[{&quot;operator&quot;:&quot;Exists&quot;}]},&quot;nodeName&quot;:&quot;mynode&quot;}' \
  -- sh
</code></pre>
