Deploy GitHub Pages
This commit is contained in:
parent
8125e59d3f
commit
c09357b854
51 changed files with 612 additions and 5095 deletions
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -963,18 +963,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1144,9 +1132,8 @@
|
|||
<h1 id="configuration-snippets">Configuration Snippets<a class="headerlink" href="#configuration-snippets" title="Permanent link">¶</a></h1>
|
||||
<h2 id="ingress">Ingress<a class="headerlink" href="#ingress" title="Permanent link">¶</a></h2>
|
||||
<p>The Ingress in this example adds a custom header to Nginx configuration that only applies to that specific Ingress. If you want to add headers that apply globally to all Ingresses, please have a look at <a href="/examples/customization/custom-headers/README">this example</a>.</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl apply -f ingress.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl apply -f ingress.yaml
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
||||
<p>Check if the contents of the annotation are present in the nginx.conf file using:
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -927,18 +927,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1085,15 +1073,7 @@
|
|||
<h1 id="custom-configuration">Custom Configuration<a class="headerlink" href="#custom-configuration" title="Permanent link">¶</a></h1>
|
||||
<p>Using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> is possible to customize the NGINX configuration</p>
|
||||
<p>For example, if we want to change the timeouts we need to create a ConfigMap:</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ cat configmap.yaml
|
||||
<div class="codehilite"><pre><span></span>$ cat configmap.yaml
|
||||
apiVersion: v1
|
||||
data:
|
||||
proxy-connect-timeout: <span class="s2">"10"</span>
|
||||
|
|
@ -1103,13 +1083,10 @@ kind: ConfigMap
|
|||
metadata:
|
||||
name: nginx-configuration
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-configuration/configmap.yaml \
|
||||
<div class="codehilite"><pre><span></span>curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-configuration/configmap.yaml \
|
||||
| kubectl apply -f -
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>If the Configmap it is updated, NGINX will be reloaded with the new configuration.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -970,18 +970,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1159,28 +1147,19 @@
|
|||
<p>This example demonstrates how to use a custom backend to render custom error pages.</p>
|
||||
<h2 id="customized-default-backend">Customized default backend<a class="headerlink" href="#customized-default-backend" title="Permanent link">¶</a></h2>
|
||||
<p>First, create the custom <code class="codehilite">default-backend</code>. It will be used by the Ingress controller later on.</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ kubectl create -f custom-default-backend.yaml
|
||||
<div class="codehilite"><pre><span></span>$ kubectl create -f custom-default-backend.yaml
|
||||
service <span class="s2">"nginx-errors"</span> created
|
||||
deployment.apps <span class="s2">"nginx-errors"</span> created
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>This should have created a Deployment and a Service with the name <code class="codehilite">nginx-errors</code>.</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ kubectl get deploy,svc
|
||||
<div class="codehilite"><pre><span></span>$ kubectl get deploy,svc
|
||||
NAME DESIRED CURRENT READY AGE
|
||||
deployment.apps/nginx-errors <span class="m">1</span> <span class="m">1</span> <span class="m">1</span> 10s
|
||||
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT<span class="o">(</span>S<span class="o">)</span> AGE
|
||||
service/nginx-errors ClusterIP <span class="m">10</span>.0.0.12 <none> <span class="m">80</span>/TCP 10s
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="ingress-controller-configuration">Ingress controller configuration<a class="headerlink" href="#ingress-controller-configuration" title="Permanent link">¶</a></h2>
|
||||
<p>If you do not already have an instance of the NGINX Ingress controller running, deploy it according to the
|
||||
|
|
@ -1195,13 +1174,10 @@ service/nginx-errors ClusterIP <span class="m">10</span>.0.0.12 <none&g
|
|||
</li>
|
||||
<li>
|
||||
<p>Take note of the IP address assigned to the NGINX Ingress controller Service.
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ kubectl get svc ingress-nginx
|
||||
<div class="codehilite"><pre><span></span>$ kubectl get svc ingress-nginx
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT<span class="o">(</span>S<span class="o">)</span> AGE
|
||||
ingress-nginx ClusterIP <span class="m">10</span>.0.0.13 <none> <span class="m">80</span>/TCP,443/TCP 10m
|
||||
</pre></div>
|
||||
</td></tr></table></p>
|
||||
</pre></div></p>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
|
|
@ -1212,15 +1188,7 @@ Make sure you can use the Service to reach NGINX before proceeding with the rest
|
|||
<h2 id="testing-error-pages">Testing error pages<a class="headerlink" href="#testing-error-pages" title="Permanent link">¶</a></h2>
|
||||
<p>Let us send a couple of HTTP requests using cURL and validate everything is working as expected.</p>
|
||||
<p>A request to the default backend returns a 404 error with a custom message:</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ curl -D- http://10.0.0.13/
|
||||
<div class="codehilite"><pre><span></span>$ curl -D- http://10.0.0.13/
|
||||
HTTP/1.1 404 Not Found
|
||||
Server: nginx/1.13.12
|
||||
Date: Tue, 12 Jun 2018 19:11:24 GMT
|
||||
|
|
@ -1230,19 +1198,9 @@ Connection: keep-alive
|
|||
|
||||
<span class="nt"><span></span>The page you're looking for could not be found.<span class="nt"></span></span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>A request with a custom <code class="codehilite">Accept</code> header returns the corresponding document type (JSON):</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</pre></div></td><td class="code"><div class="codehilite"><pre><span></span>$ curl -D- -H <span class="s1">'Accept: application/json'</span> http://10.0.0.13/
|
||||
<div class="codehilite"><pre><span></span>$ curl -D- -H <span class="s1">'Accept: application/json'</span> http://10.0.0.13/
|
||||
HTTP/1.1 <span class="m">404</span> Not Found
|
||||
Server: nginx/1.13.12
|
||||
Date: Tue, <span class="m">12</span> Jun <span class="m">2018</span> <span class="m">19</span>:12:36 GMT
|
||||
|
|
@ -1253,7 +1211,6 @@ Vary: Accept-Encoding
|
|||
|
||||
<span class="o">{</span> <span class="s2">"message"</span>: <span class="s2">"The page you're looking for could not be found"</span> <span class="o">}</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>To go further with this example, feel free to deploy your own applications and Ingress objects, and validate that the
|
||||
responses are still in the correct format when a backend returns 503 (eg. if you scale a Deployment down to 0 replica).</p>
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -956,18 +956,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1131,17 +1119,12 @@
|
|||
<p>This example aims to demonstrate the deployment of an nginx ingress controller and
|
||||
use a ConfigMap to configure a custom list of headers to be passed to the upstream
|
||||
server</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="go">curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-headers/configmap.yaml \</span>
|
||||
<div class="codehilite"><pre><span></span><span class="go">curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-headers/configmap.yaml \</span>
|
||||
<span class="go"> | kubectl apply -f -</span>
|
||||
|
||||
<span class="go">curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-headers/custom-headers.yaml \</span>
|
||||
<span class="go"> | kubectl apply -f -</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
||||
<p>Check the contents of the configmap is present in the nginx.conf file using:
|
||||
|
|
@ -1181,13 +1164,13 @@ server</p>
|
|||
</a>
|
||||
|
||||
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
||||
<span class="md-flex__ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
Next
|
||||
</span>
|
||||
Custom Upstream server checks
|
||||
External authentication
|
||||
</span>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -917,18 +917,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1097,25 +1085,7 @@ to backend service.</p>
|
|||
</ul>
|
||||
<p>You can deploy the controller as
|
||||
follows:</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f deploy/
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f deploy/
|
||||
<span class="go">deployment "demo-auth-service" created</span>
|
||||
<span class="go">service "demo-auth-service" created</span>
|
||||
<span class="go">ingress "demo-auth-service" created</span>
|
||||
|
|
@ -1135,27 +1105,9 @@ follows:</p>
|
|||
<span class="go">public-demo-echo-service public-demo-echo-service.kube.local 80 1m</span>
|
||||
<span class="go">secure-demo-echo-service secure-demo-echo-service.kube.local 80 1m</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>Test 1: public service with no auth header</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: public-demo-echo-service.kube.local'</span> -v <span class="m">192</span>.168.99.100
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: public-demo-echo-service.kube.local'</span> -v <span class="m">192</span>.168.99.100
|
||||
<span class="go">* Rebuilt URL to: 192.168.99.100/</span>
|
||||
<span class="go">* Trying 192.168.99.100...</span>
|
||||
<span class="go">* Connected to 192.168.99.100 (192.168.99.100) port 80 (#0)</span>
|
||||
|
|
@ -1174,33 +1126,9 @@ follows:</p>
|
|||
<span class="go">* Connection #0 to host 192.168.99.100 left intact</span>
|
||||
<span class="go">UserID: , UserRole:</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>Test 2: secure service with no auth header</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: secure-demo-echo-service.kube.local'</span> -v <span class="m">192</span>.168.99.100
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: secure-demo-echo-service.kube.local'</span> -v <span class="m">192</span>.168.99.100
|
||||
<span class="go">* Rebuilt URL to: 192.168.99.100/</span>
|
||||
<span class="go">* Trying 192.168.99.100...</span>
|
||||
<span class="go">* Connected to 192.168.99.100 (192.168.99.100) port 80 (#0)</span>
|
||||
|
|
@ -1225,28 +1153,9 @@ follows:</p>
|
|||
<span class="go"></html></span>
|
||||
<span class="go">* Connection #0 to host 192.168.99.100 left intact</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>Test 3: public service with valid auth header</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: public-demo-echo-service.kube.local'</span> -H <span class="s1">'User:internal'</span> -v <span class="m">192</span>.168.99.100
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: public-demo-echo-service.kube.local'</span> -H <span class="s1">'User:internal'</span> -v <span class="m">192</span>.168.99.100
|
||||
<span class="go">* Rebuilt URL to: 192.168.99.100/</span>
|
||||
<span class="go">* Trying 192.168.99.100...</span>
|
||||
<span class="go">* Connected to 192.168.99.100 (192.168.99.100) port 80 (#0)</span>
|
||||
|
|
@ -1266,28 +1175,9 @@ follows:</p>
|
|||
<span class="go">* Connection #0 to host 192.168.99.100 left intact</span>
|
||||
<span class="go">UserID: 1443635317331776148, UserRole: admin</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>Test 4: public service with valid auth header</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: secure-demo-echo-service.kube.local'</span> -H <span class="s1">'User:internal'</span> -v <span class="m">192</span>.168.99.100
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -H <span class="s1">'Host: secure-demo-echo-service.kube.local'</span> -H <span class="s1">'User:internal'</span> -v <span class="m">192</span>.168.99.100
|
||||
<span class="go">* Rebuilt URL to: 192.168.99.100/</span>
|
||||
<span class="go">* Trying 192.168.99.100...</span>
|
||||
<span class="go">* Connected to 192.168.99.100 (192.168.99.100) port 80 (#0)</span>
|
||||
|
|
@ -1307,7 +1197,6 @@ follows:</p>
|
|||
<span class="go">* Connection #0 to host 192.168.99.100 left intact</span>
|
||||
<span class="go">UserID: 605394647632969758, UserRole: admin</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
|
@ -1328,7 +1217,7 @@ follows:</p>
|
|||
<div class="md-footer-nav">
|
||||
<nav class="md-footer-nav__inner md-grid">
|
||||
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
<a href="../custom-headers/" title="Custom Headers" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
|
||||
</div>
|
||||
|
|
@ -1337,7 +1226,7 @@ follows:</p>
|
|||
<span class="md-footer-nav__direction">
|
||||
Previous
|
||||
</span>
|
||||
Custom Upstream server checks
|
||||
Custom Headers
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -918,18 +918,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1160,17 +1148,7 @@
|
|||
use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
||||
"Perfect Forward Secrecy".</p>
|
||||
<h2 id="custom-configuration">Custom configuration<a class="headerlink" href="#custom-configuration" title="Permanent link">¶</a></h2>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> cat configmap.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> cat configmap.yaml
|
||||
<span class="go">apiVersion: v1</span>
|
||||
<span class="go">data:</span>
|
||||
<span class="go"> ssl-dh-param: "ingress-nginx/lb-dhparam"</span>
|
||||
|
|
@ -1182,30 +1160,16 @@ use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
|||
<span class="go"> app.kubernetes.io/name: ingress-nginx</span>
|
||||
<span class="go"> app.kubernetes.io/part-of: ingress-nginx</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f configmap.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f configmap.yaml
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="custom-dh-parameters-secret">Custom DH parameters secret<a class="headerlink" href="#custom-dh-parameters-secret" title="Permanent link">¶</a></h2>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span>> openssl dhparam <span class="m">1024</span> <span class="m">2</span>> /dev/null <span class="p">|</span> base64
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span>> openssl dhparam <span class="m">1024</span> <span class="m">2</span>> /dev/null <span class="p">|</span> base64
|
||||
<span class="go">LS0tLS1CRUdJTiBESCBQQVJBTUVURVJ...</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> cat ssl-dh-param.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> cat ssl-dh-param.yaml
|
||||
<span class="go">apiVersion: v1</span>
|
||||
<span class="go">data:</span>
|
||||
<span class="go"> dhparam.pem: "LS0tLS1CRUdJTiBESCBQQVJBTUVURVJ..."</span>
|
||||
|
|
@ -1217,11 +1181,9 @@ use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
|||
<span class="go"> app.kubernetes.io/name: ingress-nginx</span>
|
||||
<span class="go"> app.kubernetes.io/part-of: ingress-nginx</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f ssl-dh-param.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f ssl-dh-param.yaml
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
||||
<p>Check the contents of the configmap is present in the nginx.conf file using:
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -918,18 +918,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1085,9 +1073,8 @@
|
|||
<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>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"</span>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue