<p>We create around two hundred ingress resources when we deploy the environment to k8s. We see that they are added sequentially in k8s, adding one ingress takes ~5-10 seconds, so adding 200 ingresses took us ~30 minutes.</p>
<p>The code looks like this:
<code>kubectl apply -n namespace-1 -f file-that-contains-200-ingresses.yml -server-side=true --force-conflicts=true</code></p>
<p>Is it possible to speed up that process? Can we do the update of the nginx configuration in one batch?</p>

gzaripov
<p>I don't think this is possible with <code>kubectl apply...</code> and single file since each resource is separate <code>API</code> call and needs to go via all checks. You can find more derail description <a href="https://github.com/jamiehannaford/what-happens-when-k8s" rel="nofollow noreferrer">here</a> if you would like to know what is happening when you send create request to <code>kube-api</code>.</p>
<p>What I can advise is to split this file with <a href="https://stackoverflow.com/a/72087064/15441928">yq</a> and apply single files in parallel in your <code>CI</code>.</p>
