Deploy GitHub Pages
This commit is contained in:
parent
85b4d1b2ec
commit
058de1572d
8 changed files with 99 additions and 58 deletions
|
|
@ -1151,10 +1151,15 @@
|
|||
|
||||
|
||||
<h1 id="sysctl-tuning">Sysctl tuning<a class="headerlink" href="#sysctl-tuning" title="Permanent link"> ¶</a></h1>
|
||||
<p>This example aims to demonstrate the use of an Init Container to adjust sysctl default values
|
||||
using <code class="codehilite">kubectl patch</code></p>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"</span>
|
||||
<p>This example aims to demonstrate the use of an Init Container to adjust sysctl default values using <code class="codehilite">kubectl patch</code></p>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller \</span>
|
||||
<span class="go"> --patch="$(curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/sysctl/patch.json)"</span>
|
||||
</pre></div>
|
||||
|
||||
<p><strong>Changes:</strong>
|
||||
- Backlog Queue setting <code class="codehilite">net.core.somaxconn</code> from <code class="codehilite">128</code> to <code class="codehilite">32768</code>
|
||||
- Ephemeral Ports setting <code class="codehilite">net.ipv4.ip_local_port_range</code> from <code class="codehilite">32768 60999</code> to <code class="codehilite">1024 65000</code></p>
|
||||
<p>In a <a href="https://www.nginx.com/blog/tuning-nginx/">post from the NGINX blog</a> it is possible to see an explanation for these changes</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
"spec": {
|
||||
"initContainers": [{
|
||||
"name": "sysctl",
|
||||
"image": "alpine:3.6",
|
||||
"image": "alpine:3.10",
|
||||
"securityContext": {
|
||||
"privileged": true
|
||||
},
|
||||
"command": ["sh", "-c", "sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range=1024 65535"]
|
||||
"command": ["sh", "-c", "sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range='1024 65000'"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue