Deploy GitHub Pages
This commit is contained in:
parent
bc6e898a19
commit
cf75938808
56 changed files with 483 additions and 475 deletions
|
|
@ -1150,7 +1150,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/basic-usage.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="basic-usage-host-based-routing">Basic usage - host based routing<a class="headerlink" href="#basic-usage-host-based-routing" title="Permanent link">¶</a></h1>
|
||||
<h1 id="basic-usage-host-based-routing">Basic usage - host based routing<a class="headerlink" href="#basic-usage-host-based-routing" title="Permanent link"> ¶</a></h1>
|
||||
<p>ingress-nginx can be used for many use cases, inside various cloud provider and supports a lot of configurations. In this section you can find a common usage scenario where a single load balancer powered by ingress-nginx will route traffic to 2 different HTTP backend services based on the host name.</p>
|
||||
<p>First of all follow the instructions to install ingress-nginx. Then imagine that you need to expose 2 HTTP services already installed: <code class="codehilite">myServiceA</code>, <code class="codehilite">myServiceB</code>. Let's say that you want to expose the first at <code class="codehilite">myServiceA.foo.org</code> and the second at <code class="codehilite">myServiceB.foo.org</code>. One possible solution is to create two <strong>ingress</strong> resources:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="n">apiVersion</span><span class="o">:</span> <span class="n">extensions</span><span class="o">/</span><span class="n">v1beta1</span>
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/cli-arguments.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="command-line-arguments">Command line arguments<a class="headerlink" href="#command-line-arguments" title="Permanent link">¶</a></h1>
|
||||
<h1 id="command-line-arguments">Command line arguments<a class="headerlink" href="#command-line-arguments" title="Permanent link"> ¶</a></h1>
|
||||
<p>The following command line arguments are accepted by the Ingress controller executable.</p>
|
||||
<p>They are set in the container spec of the <code class="codehilite">nginx-ingress-controller</code> Deployment manifest</p>
|
||||
<table>
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/custom-errors.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="custom-errors">Custom errors<a class="headerlink" href="#custom-errors" title="Permanent link">¶</a></h1>
|
||||
<h1 id="custom-errors">Custom errors<a class="headerlink" href="#custom-errors" title="Permanent link"> ¶</a></h1>
|
||||
<p>When the <a href="../nginx-configuration/configmap/#custom-http-errors"><code class="codehilite">custom-http-errors</code></a> option is enabled, the Ingress controller configures NGINX so
|
||||
that it passes several HTTP headers down to its <code class="codehilite">default-backend</code> in case of error:</p>
|
||||
<table>
|
||||
|
|
@ -1202,7 +1202,7 @@ could decide to return the error payload as a JSON document instead of HTML.</p>
|
|||
NGINX does not change the response from the custom default backend.</p>
|
||||
</div>
|
||||
<p>An example of such custom backend is available inside the source repository at <a href="https://github.com/kubernetes/ingress-nginx/tree/master/images/custom-error-pages">images/custom-error-pages</a>.</p>
|
||||
<p>See also the <a href="../examples/customization/custom-errors">Custom errors</a> example.</p>
|
||||
<p>See also the <a href="../../examples/customization/custom-errors">Custom errors</a> example.</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/default-backend.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="default-backend">Default backend<a class="headerlink" href="#default-backend" title="Permanent link">¶</a></h1>
|
||||
<h1 id="default-backend">Default backend<a class="headerlink" href="#default-backend" title="Permanent link"> ¶</a></h1>
|
||||
<p>The default backend is a service which handles all URL paths and hosts the nginx controller doesn't understand
|
||||
(i.e., all the requests that are not mapped with an Ingress).</p>
|
||||
<p>Basically a default backend exposes two URLs:</p>
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/exposing-tcp-udp-services.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="exposing-tcp-and-udp-services">Exposing TCP and UDP services<a class="headerlink" href="#exposing-tcp-and-udp-services" title="Permanent link">¶</a></h1>
|
||||
<h1 id="exposing-tcp-and-udp-services">Exposing TCP and UDP services<a class="headerlink" href="#exposing-tcp-and-udp-services" title="Permanent link"> ¶</a></h1>
|
||||
<p>Ingress does not support TCP or UDP services. For this reason this Ingress controller uses the flags <code class="codehilite">--tcp-services-configmap</code> and <code class="codehilite">--udp-services-configmap</code> to point to an existing config map where the key is the external port to use and the value indicates the service to expose using the format:
|
||||
<code class="codehilite"><namespace/service name>:<service port>:[PROXY]:[PROXY]</code></p>
|
||||
<p>It is also possible to use a number or the name of the port. The two last fields are optional.
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/external-articles.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="external-articles">External Articles<a class="headerlink" href="#external-articles" title="Permanent link">¶</a></h1>
|
||||
<h1 id="external-articles">External Articles<a class="headerlink" href="#external-articles" title="Permanent link"> ¶</a></h1>
|
||||
<ul>
|
||||
<li><a href="http://danielfm.me/posts/painless-nginx-ingress.html">Pain(less) NGINX Ingress</a></li>
|
||||
<li><a href="http://alesnosek.com/blog/2017/02/14/accessing-kubernetes-pods-from-outside-of-the-cluster">Accessing Kubernetes Pods from Outside of the Cluster</a></li>
|
||||
|
|
|
|||
|
|
@ -1261,13 +1261,13 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/fcgi-services.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="exposing-fastcgi-servers">Exposing FastCGI Servers<a class="headerlink" href="#exposing-fastcgi-servers" title="Permanent link">¶</a></h1>
|
||||
<h1 id="exposing-fastcgi-servers">Exposing FastCGI Servers<a class="headerlink" href="#exposing-fastcgi-servers" title="Permanent link"> ¶</a></h1>
|
||||
<blockquote>
|
||||
<p><strong>FastCGI</strong> is a <a href="https://en.wikipedia.org/wiki/Binary_protocol" title="Binary protocol">binary protocol</a> for interfacing interactive programs with a <a href="https://en.wikipedia.org/wiki/Web_server" title="Web server">web server</a>. [...] (It's) aim is to reduce the overhead related to interfacing between web server and CGI programs, allowing a server to handle more web page requests per unit of time.</p>
|
||||
<p>— Wikipedia</p>
|
||||
</blockquote>
|
||||
<p>The <em>ingress-nginx</em> ingress controller can be used to directly expose <a href="https://en.wikipedia.org/wiki/FastCGI">FastCGI</a> servers. Enabling FastCGI in your Ingress only requires setting the <em>backend-protocol</em> annotation to <code class="codehilite">FCGI</code>, and with a couple more annotations you can customize the way <em>ingress-nginx</em> handles the communication with your FastCGI <em>server</em>.</p>
|
||||
<h2 id="example-objects-to-expose-a-fastcgi-pod">Example Objects to Expose a FastCGI Pod<a class="headerlink" href="#example-objects-to-expose-a-fastcgi-pod" title="Permanent link">¶</a></h2>
|
||||
<h2 id="example-objects-to-expose-a-fastcgi-pod">Example Objects to Expose a FastCGI Pod<a class="headerlink" href="#example-objects-to-expose-a-fastcgi-pod" title="Permanent link"> ¶</a></h2>
|
||||
<p>The <em>Pod</em> example object below exposes port <code class="codehilite">9000</code>, which is the conventional FastCGI port.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">v1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Pod</span>
|
||||
|
|
@ -1330,19 +1330,19 @@
|
|||
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">fastcgi</span>
|
||||
</pre></div>
|
||||
|
||||
<h2 id="the-fastcgi-ingress-annotations">The FastCGI Ingress Annotations<a class="headerlink" href="#the-fastcgi-ingress-annotations" title="Permanent link">¶</a></h2>
|
||||
<h3 id="the-nginxingresskubernetesiobackend-protocol-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiobackend-protocol-annotation" title="Permanent link">¶</a></h3>
|
||||
<h2 id="the-fastcgi-ingress-annotations">The FastCGI Ingress Annotations<a class="headerlink" href="#the-fastcgi-ingress-annotations" title="Permanent link"> ¶</a></h2>
|
||||
<h3 id="the-nginxingresskubernetesiobackend-protocol-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiobackend-protocol-annotation" title="Permanent link"> ¶</a></h3>
|
||||
<p>To enable FastCGI, the <code class="codehilite">backend-protocol</code> annotation needs to be set to <code class="codehilite">FCGI</code>, which overrides the default <code class="codehilite">HTTP</code> value.</p>
|
||||
<blockquote>
|
||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol: "FCGI"</code></p>
|
||||
</blockquote>
|
||||
<p>This enables the <em>FastCGI</em> mode for the whole <em>Ingress</em> object.</p>
|
||||
<h3 id="the-nginxingresskubernetesiofastcgi-index-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-index</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiofastcgi-index-annotation" title="Permanent link">¶</a></h3>
|
||||
<h3 id="the-nginxingresskubernetesiofastcgi-index-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-index</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiofastcgi-index-annotation" title="Permanent link"> ¶</a></h3>
|
||||
<p>To specify an index file, the <code class="codehilite">fastcgi-index</code> annotation value can optionally be set. In the example below, the value is set to <code class="codehilite">index.php</code>. This annotation corresponds to <a href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_index">the <em>NGINX</em> <code class="codehilite">fastcgi_index</code> directive</a>.</p>
|
||||
<blockquote>
|
||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-index: "index.php"</code></p>
|
||||
</blockquote>
|
||||
<h3 id="the-nginxingresskubernetesiofastcgi-params-configmap-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-params-configmap</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiofastcgi-params-configmap-annotation" title="Permanent link">¶</a></h3>
|
||||
<h3 id="the-nginxingresskubernetesiofastcgi-params-configmap-annotation">The <code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-params-configmap</code> Annotation<a class="headerlink" href="#the-nginxingresskubernetesiofastcgi-params-configmap-annotation" title="Permanent link"> ¶</a></h3>
|
||||
<p>To specify <a href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_param"><em>NGINX</em> <code class="codehilite">fastcgi_param</code> directives</a>, the <code class="codehilite">fastcgi-params-configmap</code> annotation is used, which in turn must lead to a <em>ConfigMap</em> object containing the <em>NGINX</em> <code class="codehilite">fastcgi_param</code> directives as key/values.</p>
|
||||
<blockquote>
|
||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-params: "example-configmap"</code></p>
|
||||
|
|
|
|||
|
|
@ -1273,8 +1273,8 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/ingress-path-matching.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="ingress-path-matching">Ingress Path Matching<a class="headerlink" href="#ingress-path-matching" title="Permanent link">¶</a></h1>
|
||||
<h2 id="regular-expression-support">Regular Expression Support<a class="headerlink" href="#regular-expression-support" title="Permanent link">¶</a></h2>
|
||||
<h1 id="ingress-path-matching">Ingress Path Matching<a class="headerlink" href="#ingress-path-matching" title="Permanent link"> ¶</a></h1>
|
||||
<h2 id="regular-expression-support">Regular Expression Support<a class="headerlink" href="#regular-expression-support" title="Permanent link"> ¶</a></h2>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>Regular expressions and wild cards are not supported in the <code class="codehilite">spec.rules.host</code> field. Full hostnames must be used. </p>
|
||||
|
|
@ -1305,10 +1305,10 @@ This can be enabled by setting the <code class="codehilite">nginx.ingress.kubern
|
|||
}
|
||||
</pre></div>
|
||||
|
||||
<h2 id="path-priority">Path Priority<a class="headerlink" href="#path-priority" title="Permanent link">¶</a></h2>
|
||||
<h2 id="path-priority">Path Priority<a class="headerlink" href="#path-priority" title="Permanent link"> ¶</a></h2>
|
||||
<p>In NGINX, regular expressions follow a <strong>first match</strong> policy. In order to enable more accurate path matching, ingress-nginx first orders the paths by descending length before writing them to the NGINX template as location blocks.</p>
|
||||
<p><strong>Please read the <a href="#warning">warning</a> before using regular expressions in your ingress definitions.</strong></p>
|
||||
<h3 id="example">Example<a class="headerlink" href="#example" title="Permanent link">¶</a></h3>
|
||||
<h3 id="example">Example<a class="headerlink" href="#example" title="Permanent link"> ¶</a></h3>
|
||||
<p>Let the following two ingress definitions be created:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">extensions/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
|
|
@ -1370,10 +1370,10 @@ location ~* "^/foo/bar" {
|
|||
<ul>
|
||||
<li>If the <code class="codehilite">use-regex</code> OR <code class="codehilite">rewrite-target</code> annotation is used on any Ingress for a given host, then the case insensitive regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a> will be enforced on ALL paths for a given host regardless of what Ingress they are defined on.</li>
|
||||
</ul>
|
||||
<h2 id="warning">Warning<a class="headerlink" href="#warning" title="Permanent link">¶</a></h2>
|
||||
<h2 id="warning">Warning<a class="headerlink" href="#warning" title="Permanent link"> ¶</a></h2>
|
||||
<p>The following example describes a case that may inflict unwanted path matching behaviour.</p>
|
||||
<p>This case is expected and a result of NGINX's a first match policy for paths that use the regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a>. For more information about how a path is chosen, please read the following article: <a href="https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms">"Understanding Nginx Server and Location Block Selection Algorithms"</a>.</p>
|
||||
<h3 id="example_1">Example<a class="headerlink" href="#example_1" title="Permanent link">¶</a></h3>
|
||||
<h3 id="example_1">Example<a class="headerlink" href="#example_1" title="Permanent link"> ¶</a></h3>
|
||||
<p>Let the following ingress be defined:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">extensions/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
|
|
|
|||
|
|
@ -1277,16 +1277,16 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/miscellaneous.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="miscellaneous">Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permanent link">¶</a></h1>
|
||||
<h2 id="source-ip-address">Source IP address<a class="headerlink" href="#source-ip-address" title="Permanent link">¶</a></h2>
|
||||
<h1 id="miscellaneous">Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permanent link"> ¶</a></h1>
|
||||
<h2 id="source-ip-address">Source IP address<a class="headerlink" href="#source-ip-address" title="Permanent link"> ¶</a></h2>
|
||||
<p>By default NGINX uses the content of the header <code class="codehilite">X-Forwarded-For</code> as the source of truth to get information about the client IP address. This works without issues in L7 <strong>if we configure the setting <code class="codehilite">proxy-real-ip-cidr</code></strong> with the correct information of the IP/network address of trusted external load balancer.</p>
|
||||
<p>If the ingress controller is running in AWS we need to use the VPC IPv4 CIDR.</p>
|
||||
<p>Another option is to enable proxy protocol using <code class="codehilite">use-proxy-protocol: "true"</code>.</p>
|
||||
<p>In this mode NGINX does not use the content of the header to get the source IP address of the connection.</p>
|
||||
<h2 id="proxy-protocol">Proxy Protocol<a class="headerlink" href="#proxy-protocol" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-protocol">Proxy Protocol<a class="headerlink" href="#proxy-protocol" title="Permanent link"> ¶</a></h2>
|
||||
<p>If you are using a L4 proxy to forward the traffic to the NGINX pods and terminate HTTP/HTTPS there, you will lose the remote endpoint's IP address. To prevent this you could use the <a href="http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt">Proxy Protocol</a> for forwarding traffic, this will send the connection details before forwarding the actual TCP connection itself.</p>
|
||||
<p>Amongst others <a href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-proxy-protocol.html">ELBs in AWS</a> and <a href="http://www.haproxy.org/">HAProxy</a> support Proxy Protocol.</p>
|
||||
<h2 id="websockets">Websockets<a class="headerlink" href="#websockets" title="Permanent link">¶</a></h2>
|
||||
<h2 id="websockets">Websockets<a class="headerlink" href="#websockets" title="Permanent link"> ¶</a></h2>
|
||||
<p>Support for websockets is provided by NGINX out of the box. No special configuration required.</p>
|
||||
<p>The only requirement to avoid the close of connections is the increase of the values of <code class="codehilite">proxy-read-timeout</code> and <code class="codehilite">proxy-send-timeout</code>.</p>
|
||||
<p>The default value of this settings is <code class="codehilite">60 seconds</code>.</p>
|
||||
|
|
@ -1295,18 +1295,18 @@
|
|||
<p class="admonition-title">Important</p>
|
||||
<p>If the NGINX ingress controller is exposed with a service <code class="codehilite">type=LoadBalancer</code> make sure the protocol between the loadbalancer and NGINX is TCP.</p>
|
||||
</div>
|
||||
<h2 id="optimizing-tls-time-to-first-byte-tttfb">Optimizing TLS Time To First Byte (TTTFB)<a class="headerlink" href="#optimizing-tls-time-to-first-byte-tttfb" title="Permanent link">¶</a></h2>
|
||||
<h2 id="optimizing-tls-time-to-first-byte-tttfb">Optimizing TLS Time To First Byte (TTTFB)<a class="headerlink" href="#optimizing-tls-time-to-first-byte-tttfb" title="Permanent link"> ¶</a></h2>
|
||||
<p>NGINX provides the configuration option <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size">ssl_buffer_size</a> to allow the optimization of the TLS record size.</p>
|
||||
<p>This improves the <a href="https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/">TLS Time To First Byte</a> (TTTFB).
|
||||
The default value in the Ingress controller is <code class="codehilite">4k</code> (NGINX default is <code class="codehilite">16k</code>).</p>
|
||||
<h2 id="retries-in-non-idempotent-methods">Retries in non-idempotent methods<a class="headerlink" href="#retries-in-non-idempotent-methods" title="Permanent link">¶</a></h2>
|
||||
<h2 id="retries-in-non-idempotent-methods">Retries in non-idempotent methods<a class="headerlink" href="#retries-in-non-idempotent-methods" title="Permanent link"> ¶</a></h2>
|
||||
<p>Since 1.9.13 NGINX will not retry non-idempotent requests (POST, LOCK, PATCH) in case of an error.
|
||||
The previous behavior can be restored using <code class="codehilite">retry-non-idempotent=true</code> in the configuration ConfigMap.</p>
|
||||
<h2 id="limitations">Limitations<a class="headerlink" href="#limitations" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limitations">Limitations<a class="headerlink" href="#limitations" title="Permanent link"> ¶</a></h2>
|
||||
<ul>
|
||||
<li>Ingress rules for TLS require the definition of the field <code class="codehilite">host</code></li>
|
||||
</ul>
|
||||
<h2 id="why-endpoints-and-not-services">Why endpoints and not services<a class="headerlink" href="#why-endpoints-and-not-services" title="Permanent link">¶</a></h2>
|
||||
<h2 id="why-endpoints-and-not-services">Why endpoints and not services<a class="headerlink" href="#why-endpoints-and-not-services" title="Permanent link"> ¶</a></h2>
|
||||
<p>The NGINX ingress controller does not use <a href="http://kubernetes.io/docs/user-guide/services">Services</a> to route traffic to the pods. Instead it uses the Endpoints API in order to bypass <a href="http://kubernetes.io/docs/admin/kube-proxy/">kube-proxy</a> to allow NGINX features like session affinity and custom load balancing algorithms. It also removes some overhead, such as conntrack entries for iptables DNAT.</p>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1247,29 +1247,23 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/monitoring.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="prometheus-and-grafana-installation">Prometheus and Grafana installation<a class="headerlink" href="#prometheus-and-grafana-installation" title="Permanent link">¶</a></h1>
|
||||
<h1 id="prometheus-and-grafana-installation">Prometheus and Grafana installation<a class="headerlink" href="#prometheus-and-grafana-installation" title="Permanent link"> ¶</a></h1>
|
||||
<p>This tutorial will show you how to install <a href="https://prometheus.io/">Prometheus</a> and <a href="https://grafana.com/">Grafana</a> for scraping the metrics of the NGINX Ingress controller.</p>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>This example uses <code class="codehilite">emptyDir</code> volumes for Prometheus and Grafana. This means once the pod gets terminated you will lose all the data.</p>
|
||||
</div>
|
||||
<h2 id="before-you-begin">Before You Begin<a class="headerlink" href="#before-you-begin" title="Permanent link">¶</a></h2>
|
||||
<h2 id="before-you-begin">Before You Begin<a class="headerlink" href="#before-you-begin" title="Permanent link"> ¶</a></h2>
|
||||
<p>The NGINX Ingress controller should already be deployed according to the deployment instructions <a href="../../deploy/">here</a>.</p>
|
||||
<p>Note that the kustomize bases used in this tutorial are stored in the <a href="https://github.com/kubernetes/ingress-nginx/tree/master/deploy">deploy</a> folder of the GitHub repository <a href="https://github.com/kubernetes/ingress-nginx">kubernetes/ingress-nginx</a>.</p>
|
||||
<h2 id="deploy-and-configure-prometheus-server">Deploy and configure Prometheus Server<a class="headerlink" href="#deploy-and-configure-prometheus-server" title="Permanent link">¶</a></h2>
|
||||
<h2 id="deploy-and-configure-prometheus-server">Deploy and configure Prometheus Server<a class="headerlink" href="#deploy-and-configure-prometheus-server" title="Permanent link"> ¶</a></h2>
|
||||
<p>The Prometheus server must be configured so that it can discover endpoints of services. If a Prometheus server is already running in the cluster and if it is configured in a way that it can find the ingress controller pods, no extra configuration is needed.</p>
|
||||
<p>If there is no existing Prometheus server running, the rest of this tutorial will guide you through the steps needed to deploy a properly configured Prometheus server.</p>
|
||||
<p>Running the following command deploys prometheus in Kubernetes:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/</span>
|
||||
<span class="go">serviceaccount/prometheus-server created</span>
|
||||
<span class="go">role.rbac.authorization.k8s.io/prometheus-server created</span>
|
||||
<span class="go">rolebinding.rbac.authorization.k8s.io/prometheus-server created</span>
|
||||
<span class="go">configmap/prometheus-configuration-bc6bcg7b65 created</span>
|
||||
<span class="go">service/prometheus-server created</span>
|
||||
<span class="go">deployment.apps/prometheus-server created</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="prometheus-dashboard">Prometheus Dashboard<a class="headerlink" href="#prometheus-dashboard" title="Permanent link">¶</a></h3>
|
||||
<h3 id="prometheus-dashboard">Prometheus Dashboard<a class="headerlink" href="#prometheus-dashboard" title="Permanent link"> ¶</a></h3>
|
||||
<p>Open Prometheus dashboard in a web browser:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl get svc -n ingress-nginx</span>
|
||||
<span class="go">NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE</span>
|
||||
|
|
@ -1290,7 +1284,7 @@
|
|||
<p>Open your browser and visit the following URL: <em>http://{node IP address}:{prometheus-svc-nodeport}</em> to load the Prometheus Dashboard.</p>
|
||||
<p>According to the above example, this URL will be http://10.192.0.3:32630</p>
|
||||
<p><img alt="Dashboard" src="../../images/prometheus-dashboard.png" /></p>
|
||||
<h3 id="grafana">Grafana<a class="headerlink" href="#grafana" title="Permanent link">¶</a></h3>
|
||||
<h3 id="grafana">Grafana<a class="headerlink" href="#grafana" title="Permanent link"> ¶</a></h3>
|
||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/grafana/</span>
|
||||
</pre></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/multiple-ingress.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="multiple-ingress-controllers">Multiple Ingress controllers<a class="headerlink" href="#multiple-ingress-controllers" title="Permanent link">¶</a></h1>
|
||||
<h1 id="multiple-ingress-controllers">Multiple Ingress controllers<a class="headerlink" href="#multiple-ingress-controllers" title="Permanent link"> ¶</a></h1>
|
||||
<p>If you're running multiple ingress controllers, or running on a cloud provider that natively handles ingress such as GKE,
|
||||
you need to specify the annotation <code class="codehilite">kubernetes.io/ingress.class: "nginx"</code> in all ingresses that you would like the ingress-nginx controller to claim.</p>
|
||||
<p>For instance,</p>
|
||||
|
|
@ -1214,7 +1214,7 @@ you need to specify the annotation <code class="codehilite">kubernetes.io/ingres
|
|||
<p>To reiterate, setting the annotation to any value which does not match a valid ingress class will force the NGINX Ingress controller to ignore your Ingress.
|
||||
If you are only running a single NGINX ingress controller, this can be achieved by setting the annotation to any value except "nginx" or an empty string.</p>
|
||||
<p>Do this if you wish to use one of the other Ingress controllers at the same time as the NGINX controller.</p>
|
||||
<h2 id="multiple-ingress-nginx-controllers">Multiple ingress-nginx controllers<a class="headerlink" href="#multiple-ingress-nginx-controllers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="multiple-ingress-nginx-controllers">Multiple ingress-nginx controllers<a class="headerlink" href="#multiple-ingress-nginx-controllers" title="Permanent link"> ¶</a></h2>
|
||||
<p>This mechanism also provides users the ability to run <em>multiple</em> NGINX ingress controllers (e.g. one which serves public traffic, one which serves "internal" traffic).
|
||||
To do this, the option <code class="codehilite">--ingress-class</code> must be changed to a value unique for the cluster within the definition of the replication controller.
|
||||
Here is a partial example:</p>
|
||||
|
|
|
|||
|
|
@ -1945,7 +1945,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/nginx-configuration/annotations.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="annotations">Annotations<a class="headerlink" href="#annotations" title="Permanent link">¶</a></h1>
|
||||
<h1 id="annotations">Annotations<a class="headerlink" href="#annotations" title="Permanent link"> ¶</a></h1>
|
||||
<p>You can add these Kubernetes annotations to specific Ingress objects to customize their behavior.</p>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
|
|
@ -2221,10 +2221,6 @@ table below.</p>
|
|||
<td>string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#secure-backends">nginx.ingress.kubernetes.io/secure-verify-ca-secret</a></td>
|
||||
<td>string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#server-alias">nginx.ingress.kubernetes.io/server-alias</a></td>
|
||||
<td>string</td>
|
||||
</tr>
|
||||
|
|
@ -2382,7 +2378,7 @@ table below.</p>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="canary">Canary<a class="headerlink" href="#canary" title="Permanent link">¶</a></h3>
|
||||
<h3 id="canary">Canary<a class="headerlink" href="#canary" title="Permanent link"> ¶</a></h3>
|
||||
<p>In some cases, you may want to "canary" a new set of changes by sending a small number of requests to a different service than the production service. The canary annotation enables the Ingress spec to act as an alternative service for requests to route to depending on the rules applied. The following annotations to configure canary can be enabled after <code class="codehilite">nginx.ingress.kubernetes.io/canary: "true"</code> is set:</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -2403,7 +2399,7 @@ table below.</p>
|
|||
<p><strong>Note</strong> that when you mark an ingress as canary, then all the other non-canary annotations will be ignored (inherited from the corresponding main ingress) except <code class="codehilite">nginx.ingress.kubernetes.io/load-balance</code> and <code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by</code>.</p>
|
||||
<p><strong>Known Limitations</strong></p>
|
||||
<p>Currently a maximum of one canary ingress can be applied per Ingress rule.</p>
|
||||
<h3 id="rewrite">Rewrite<a class="headerlink" href="#rewrite" title="Permanent link">¶</a></h3>
|
||||
<h3 id="rewrite">Rewrite<a class="headerlink" href="#rewrite" title="Permanent link"> ¶</a></h3>
|
||||
<p>In some scenarios the exposed URL in the backend service differs from the specified path in the Ingress rule. Without a rewrite any request will return 404.
|
||||
Set the annotation <code class="codehilite">nginx.ingress.kubernetes.io/rewrite-target</code> to the path expected by the service.</p>
|
||||
<p>If the Application Root is exposed in a different path and needs to be redirected, set the annotation <code class="codehilite">nginx.ingress.kubernetes.io/app-root</code> to redirect requests for <code class="codehilite">/</code>.</p>
|
||||
|
|
@ -2411,7 +2407,7 @@ Set the annotation <code class="codehilite">nginx.ingress.kubernetes.io/rewrite-
|
|||
<p class="admonition-title">Example</p>
|
||||
<p>Please check the <a href="../../../examples/rewrite/">rewrite</a> example.</p>
|
||||
</div>
|
||||
<h3 id="session-affinity">Session Affinity<a class="headerlink" href="#session-affinity" title="Permanent link">¶</a></h3>
|
||||
<h3 id="session-affinity">Session Affinity<a class="headerlink" href="#session-affinity" title="Permanent link"> ¶</a></h3>
|
||||
<p>The annotation <code class="codehilite">nginx.ingress.kubernetes.io/affinity</code> enables and sets the affinity type in all Upstreams of an Ingress. This way, a request will always be directed to the same upstream server.
|
||||
The only affinity type available for NGINX is <code class="codehilite">cookie</code>.</p>
|
||||
<p>The annotation <code class="codehilite">nginx.ingress.kubernetes.io/affinity-mode</code> defines the stickyness of a session. Setting this to <code class="codehilite">balanced</code> (default) will redistribute some sessions if a deployment gets scaled up, therefore rebalancing the load on the servers. Setting this to <code class="codehilite">persistent</code> will not rebalance sessions to new servers, therefore providing maximum stickyness.</p>
|
||||
|
|
@ -2423,10 +2419,10 @@ The only affinity type available for NGINX is <code class="codehilite">cookie</c
|
|||
<p class="admonition-title">Example</p>
|
||||
<p>Please check the <a href="../../../examples/affinity/cookie/">affinity</a> example.</p>
|
||||
</div>
|
||||
<h4 id="cookie-affinity">Cookie affinity<a class="headerlink" href="#cookie-affinity" title="Permanent link">¶</a></h4>
|
||||
<h4 id="cookie-affinity">Cookie affinity<a class="headerlink" href="#cookie-affinity" title="Permanent link"> ¶</a></h4>
|
||||
<p>If you use the <code class="codehilite">cookie</code> affinity type you can also specify the name of the cookie that will be used to route the requests with the annotation <code class="codehilite">nginx.ingress.kubernetes.io/session-cookie-name</code>. The default is to create a cookie named 'INGRESSCOOKIE'.</p>
|
||||
<p>The NGINX annotation <code class="codehilite">nginx.ingress.kubernetes.io/session-cookie-path</code> defines the path that will be set on the cookie. This is optional unless the annotation <code class="codehilite">nginx.ingress.kubernetes.io/use-regex</code> is set to true; Session cookie paths do not support regex.</p>
|
||||
<h3 id="authentication">Authentication<a class="headerlink" href="#authentication" title="Permanent link">¶</a></h3>
|
||||
<h3 id="authentication">Authentication<a class="headerlink" href="#authentication" title="Permanent link"> ¶</a></h3>
|
||||
<p>Is possible to add authentication adding additional annotations in the Ingress rule. The source of the authentication is a secret that contains usernames and passwords.</p>
|
||||
<p>The annotations are:
|
||||
<div class="codehilite"><pre><span></span>nginx.ingress.kubernetes.io/auth-type: [basic|digest]
|
||||
|
|
@ -2452,21 +2448,21 @@ This annotation also accepts the alternative form "namespace/secretName", in whi
|
|||
<p class="admonition-title">Example</p>
|
||||
<p>Please check the <a href="../../../examples/auth/basic/">auth</a> example.</p>
|
||||
</div>
|
||||
<h3 id="custom-nginx-upstream-hashing">Custom NGINX upstream hashing<a class="headerlink" href="#custom-nginx-upstream-hashing" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-nginx-upstream-hashing">Custom NGINX upstream hashing<a class="headerlink" href="#custom-nginx-upstream-hashing" title="Permanent link"> ¶</a></h3>
|
||||
<p>NGINX supports load balancing by client-server mapping based on <a href="http://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash">consistent hashing</a> for a given key. The key can contain text, variables or any combination thereof. This feature allows for request stickiness other than client IP or cookies. The <a href="http://www.last.fm/user/RJ/journal/2007/04/10/392555/">ketama</a> consistent hashing method will be used which ensures only a few keys would be remapped to different servers on upstream group changes.</p>
|
||||
<p>There is a special mode of upstream hashing called subset. In this mode, upstream servers are grouped into subsets, and stickiness works by mapping keys to a subset instead of individual upstream servers. Specific server is chosen uniformly at random from the selected sticky subset. It provides a balance between stickiness and load distribution.</p>
|
||||
<p>To enable consistent hashing for a backend:</p>
|
||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by</code>: the nginx variable, text value or any combination thereof to use for consistent hashing. For example <code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by: "$request_uri"</code> to consistently hash upstream requests by the current request URI.</p>
|
||||
<p>"subset" hashing can be enabled setting <code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by-subset</code>: "true". This maps requests to subset of nodes instead of a single one. <code class="codehilite">upstream-hash-by-subset-size</code> determines the size of each subset (default 3).</p>
|
||||
<p>Please check the <a href="../../../examples/chashsubset/deployment.yaml">chashsubset</a> example.</p>
|
||||
<h3 id="custom-nginx-load-balancing">Custom NGINX load balancing<a class="headerlink" href="#custom-nginx-load-balancing" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-nginx-load-balancing">Custom NGINX load balancing<a class="headerlink" href="#custom-nginx-load-balancing" title="Permanent link"> ¶</a></h3>
|
||||
<p>This is similar to <a href="../configmap/#load-balance"><code class="codehilite">load-balance</code> in ConfigMap</a>, but configures load balancing algorithm per ingress.</p>
|
||||
<blockquote>
|
||||
<p>Note that <code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by</code> takes preference over this. If this and <code class="codehilite">nginx.ingress.kubernetes.io/upstream-hash-by</code> are not set then we fallback to using globally configured load balancing algorithm.</p>
|
||||
</blockquote>
|
||||
<h3 id="custom-nginx-upstream-vhost">Custom NGINX upstream vhost<a class="headerlink" href="#custom-nginx-upstream-vhost" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-nginx-upstream-vhost">Custom NGINX upstream vhost<a class="headerlink" href="#custom-nginx-upstream-vhost" title="Permanent link"> ¶</a></h3>
|
||||
<p>This configuration setting allows you to control the value for host in the following statement: <code class="codehilite">proxy_set_header Host $host</code>, which forms part of the location block. This is useful if you need to call the upstream server by something other than <code class="codehilite">$host</code>.</p>
|
||||
<h3 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link">¶</a></h3>
|
||||
<h3 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link"> ¶</a></h3>
|
||||
<p>It is possible to enable Client Certificate Authentication using additional annotations in Ingress Rule.</p>
|
||||
<p>The annotations are:</p>
|
||||
<ul>
|
||||
|
|
@ -2492,7 +2488,7 @@ This annotation also accepts the alternative form "namespace/secretName", in whi
|
|||
<p>Cloudflare only allows Authenticated Origin Pulls and is required to use their own certificate: <a href="https://blog.cloudflare.com/protecting-the-origin-with-tls-authenticated-origin-pulls/">https://blog.cloudflare.com/protecting-the-origin-with-tls-authenticated-origin-pulls/</a></p>
|
||||
<p>Only Authenticated Origin Pulls are allowed and can be configured by following their tutorial: <a href="https://support.cloudflare.com/hc/en-us/articles/204494148-Setting-up-NGINX-to-use-TLS-Authenticated-Origin-Pulls">https://support.cloudflare.com/hc/en-us/articles/204494148-Setting-up-NGINX-to-use-TLS-Authenticated-Origin-Pulls</a></p>
|
||||
</div>
|
||||
<h3 id="backend-certificate-authentication">Backend Certificate Authentication<a class="headerlink" href="#backend-certificate-authentication" title="Permanent link">¶</a></h3>
|
||||
<h3 id="backend-certificate-authentication">Backend Certificate Authentication<a class="headerlink" href="#backend-certificate-authentication" title="Permanent link"> ¶</a></h3>
|
||||
<p>It is possible to authenticate to a proxied HTTPS backend with certificate using additional annotations in Ingress Rule.</p>
|
||||
<ul>
|
||||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-ssl-secret: secretName</code>:
|
||||
|
|
@ -2507,23 +2503,23 @@ This annotation also accepts the alternative form "namespace/secretName", in whi
|
|||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-ssl-protocols</code>:
|
||||
Enables the specified <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ssl_protocols">protocols</a> for requests to a proxied HTTPS server.</li>
|
||||
</ul>
|
||||
<h3 id="configuration-snippet">Configuration snippet<a class="headerlink" href="#configuration-snippet" title="Permanent link">¶</a></h3>
|
||||
<h3 id="configuration-snippet">Configuration snippet<a class="headerlink" href="#configuration-snippet" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using this annotation you can add additional configuration to the NGINX location. For example:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/configuration-snippet</span><span class="p">:</span> <span class="p p-Indicator">|</span>
|
||||
<span class="no">more_set_headers "Request-Id: $req_id";</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="custom-http-errors">Custom HTTP Errors<a class="headerlink" href="#custom-http-errors" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-http-errors">Custom HTTP Errors<a class="headerlink" href="#custom-http-errors" title="Permanent link"> ¶</a></h3>
|
||||
<p>Like the <a href="../configmap/#custom-http-errors"><code class="codehilite">custom-http-errors</code></a> value in the ConfigMap, this annotation will set NGINX <code class="codehilite">proxy-intercept-errors</code>, but only for the NGINX location associated with this ingress. If a <a href="#default-backend">default backend annotation</a> is specified on the ingress, the errors will be routed to that annotation's default backend service (instead of the global default backend).
|
||||
Different ingresses can specify different sets of error codes. Even if multiple ingress objects share the same hostname, this annotation can be used to intercept different error codes for each ingress (for example, different error codes to be intercepted for different paths on the same hostname, if each path is on a different ingress).
|
||||
If <code class="codehilite">custom-http-errors</code> is also specified globally, the error values specified in this annotation will override the global value for the given ingress' hostname and path.</p>
|
||||
<p>Example usage:
|
||||
<div class="codehilite"><pre><span></span>nginx.ingress.kubernetes.io/custom-http-errors: "404,415"
|
||||
</pre></div></p>
|
||||
<h3 id="default-backend">Default Backend<a class="headerlink" href="#default-backend" title="Permanent link">¶</a></h3>
|
||||
<h3 id="default-backend">Default Backend<a class="headerlink" href="#default-backend" title="Permanent link"> ¶</a></h3>
|
||||
<p>This annotation is of the form <code class="codehilite">nginx.ingress.kubernetes.io/default-backend: <svc name></code> to specify a custom default backend. This <code class="codehilite"><svc name></code> is a reference to a service inside of the same namespace in which you are applying this annotation. This annotation overrides the global default backend.</p>
|
||||
<p>This service will be handle the response when the service in the Ingress rule does not have active endpoints. It will also handle the error responses if both this annotation and the <a href="#custom-http-errors">custom-http-errors annotation</a> is set.</p>
|
||||
<h3 id="enable-cors">Enable CORS<a class="headerlink" href="#enable-cors" title="Permanent link">¶</a></h3>
|
||||
<h3 id="enable-cors">Enable CORS<a class="headerlink" href="#enable-cors" title="Permanent link"> ¶</a></h3>
|
||||
<p>To enable Cross-Origin Resource Sharing (CORS) in an Ingress rule, add the annotation
|
||||
<code class="codehilite">nginx.ingress.kubernetes.io/enable-cors: "true"</code>. This will add a section in the server
|
||||
location enabling this functionality.</p>
|
||||
|
|
@ -2573,7 +2569,7 @@ location enabling this functionality.</p>
|
|||
<p class="admonition-title">Note</p>
|
||||
<p>For more information please see <a href="https://enable-cors.org/server_nginx.html">https://enable-cors.org</a></p>
|
||||
</div>
|
||||
<h3 id="http2-push-preload">HTTP2 Push Preload.<a class="headerlink" href="#http2-push-preload" title="Permanent link">¶</a></h3>
|
||||
<h3 id="http2-push-preload">HTTP2 Push Preload.<a class="headerlink" href="#http2-push-preload" title="Permanent link"> ¶</a></h3>
|
||||
<p>Enables automatic conversion of preload links specified in the “Link” response header fields into push requests.</p>
|
||||
<div class="admonition example">
|
||||
<p class="admonition-title">Example</p>
|
||||
|
|
@ -2581,7 +2577,7 @@ location enabling this functionality.</p>
|
|||
<li><code class="codehilite">nginx.ingress.kubernetes.io/http2-push-preload: "true"</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 id="server-alias">Server Alias<a class="headerlink" href="#server-alias" title="Permanent link">¶</a></h3>
|
||||
<h3 id="server-alias">Server Alias<a class="headerlink" href="#server-alias" title="Permanent link"> ¶</a></h3>
|
||||
<p>Allows the definition of one or more aliases in the server definition of the NGINX configuration using the annotation <code class="codehilite">nginx.ingress.kubernetes.io/server-alias: "<alias 1>,<alias 2>"</code>.
|
||||
This will create a server with the same configuration, but adding new values to the <code class="codehilite">server_name</code> directive.</p>
|
||||
<div class="admonition note">
|
||||
|
|
@ -2591,7 +2587,7 @@ If a server-alias is created and later a new server with the same hostname is cr
|
|||
place over the alias configuration.</p>
|
||||
</div>
|
||||
<p>For more information please see <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name">the <code class="codehilite">server_name</code> documentation</a>.</p>
|
||||
<h3 id="server-snippet">Server snippet<a class="headerlink" href="#server-snippet" title="Permanent link">¶</a></h3>
|
||||
<h3 id="server-snippet">Server snippet<a class="headerlink" href="#server-snippet" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using the annotation <code class="codehilite">nginx.ingress.kubernetes.io/server-snippet</code> it is possible to add custom configuration in the server configuration block.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">extensions/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
|
|
@ -2613,7 +2609,7 @@ place over the alias configuration.</p>
|
|||
<p class="admonition-title">Attention</p>
|
||||
<p>This annotation can be used only once per host.</p>
|
||||
</div>
|
||||
<h3 id="client-body-buffer-size">Client Body Buffer Size<a class="headerlink" href="#client-body-buffer-size" title="Permanent link">¶</a></h3>
|
||||
<h3 id="client-body-buffer-size">Client Body Buffer Size<a class="headerlink" href="#client-body-buffer-size" title="Permanent link"> ¶</a></h3>
|
||||
<p>Sets buffer size for reading client request body per location. In case the request body is larger than the buffer,
|
||||
the whole body or only its part is written to a temporary file. By default, buffer size is equal to two memory pages.
|
||||
This is 8K on x86, other 32-bit platforms, and x86-64. It is usually 16K on other 64-bit platforms. This annotation is
|
||||
|
|
@ -2633,7 +2629,7 @@ applied to each location provided in the ingress rule.</p>
|
|||
</ul>
|
||||
</div>
|
||||
<p>For more information please see <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size">http://nginx.org</a></p>
|
||||
<h3 id="external-authentication">External Authentication<a class="headerlink" href="#external-authentication" title="Permanent link">¶</a></h3>
|
||||
<h3 id="external-authentication">External Authentication<a class="headerlink" href="#external-authentication" title="Permanent link"> ¶</a></h3>
|
||||
<p>To use an existing service that provides authentication the Ingress rule can be annotated with <code class="codehilite">nginx.ingress.kubernetes.io/auth-url</code> to indicate the URL where the HTTP request should be sent.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/auth-url</span><span class="p">:</span> <span class="s">"URL</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">authentication</span><span class="nv"> </span><span class="s">service"</span>
|
||||
</pre></div>
|
||||
|
|
@ -2669,12 +2665,12 @@ applied to each location provided in the ingress rule.</p>
|
|||
<p class="admonition-title">Example</p>
|
||||
<p>Please check the <a href="../../../examples/auth/external-auth/">external-auth</a> example.</p>
|
||||
</div>
|
||||
<h4 id="global-external-authentication">Global External Authentication<a class="headerlink" href="#global-external-authentication" title="Permanent link">¶</a></h4>
|
||||
<h4 id="global-external-authentication">Global External Authentication<a class="headerlink" href="#global-external-authentication" title="Permanent link"> ¶</a></h4>
|
||||
<p>By default the controller redirects all requests to an existing service that provides authentication if <code class="codehilite">global-auth-url</code> is set in the NGINX ConfigMap. If you want to disable this behavior for that ingress, you can use <code class="codehilite">enable-global-auth: "false"</code> in the NGINX ConfigMap.
|
||||
<code class="codehilite">nginx.ingress.kubernetes.io/enable-global-auth</code>:
|
||||
indicates if GlobalExternalAuth configuration should be applied or not to this Ingress rule. Default values is set to <code class="codehilite">"true"</code>.</p>
|
||||
<p>!!! note For more information please see <a href="../configmap/#global-auth-url">global-auth-url</a>.</p>
|
||||
<h3 id="rate-limiting">Rate limiting<a class="headerlink" href="#rate-limiting" title="Permanent link">¶</a></h3>
|
||||
<h3 id="rate-limiting">Rate limiting<a class="headerlink" href="#rate-limiting" title="Permanent link"> ¶</a></h3>
|
||||
<p>These annotations define limits on connections and transmission rates. These can be used to mitigate <a href="https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus">DDoS Attacks</a>.</p>
|
||||
<ul>
|
||||
<li><code class="codehilite">nginx.ingress.kubernetes.io/limit-connections</code>: number of concurrent connections allowed from a single IP address. A 503 error is returned when exceeding this limit.</li>
|
||||
|
|
@ -2687,13 +2683,13 @@ applied to each location provided in the ingress rule.</p>
|
|||
<p>If you specify multiple annotations in a single Ingress rule, limits are applied in the order <code class="codehilite">limit-connections</code>, <code class="codehilite">limit-rpm</code>, <code class="codehilite">limit-rps</code>.</p>
|
||||
<p>To configure settings globally for all Ingress rules, the <code class="codehilite">limit-rate-after</code> and <code class="codehilite">limit-rate</code> values may be set in the <a href="../configmap/#limit-rate">NGINX ConfigMap</a>. The value set in an Ingress annotation will override the global setting.</p>
|
||||
<p>The client IP address will be set based on the use of <a href="../configmap/#use-proxy-protocol">PROXY protocol</a> or from the <code class="codehilite">X-Forwarded-For</code> header value when <a href="../configmap/#use-forwarded-headers">use-forwarded-headers</a> is enabled.</p>
|
||||
<h3 id="permanent-redirect">Permanent Redirect<a class="headerlink" href="#permanent-redirect" title="Permanent link">¶</a></h3>
|
||||
<h3 id="permanent-redirect">Permanent Redirect<a class="headerlink" href="#permanent-redirect" title="Permanent link"> ¶</a></h3>
|
||||
<p>This annotation allows to return a permanent redirect instead of sending data to the upstream. For example <code class="codehilite">nginx.ingress.kubernetes.io/permanent-redirect: https://www.google.com</code> would redirect everything to Google.</p>
|
||||
<h3 id="permanent-redirect-code">Permanent Redirect Code<a class="headerlink" href="#permanent-redirect-code" title="Permanent link">¶</a></h3>
|
||||
<h3 id="permanent-redirect-code">Permanent Redirect Code<a class="headerlink" href="#permanent-redirect-code" title="Permanent link"> ¶</a></h3>
|
||||
<p>This annotation allows you to modify the status code used for permanent redirects. For example <code class="codehilite">nginx.ingress.kubernetes.io/permanent-redirect-code: '308'</code> would return your permanent-redirect with a 308.</p>
|
||||
<h3 id="temporal-redirect">Temporal Redirect<a class="headerlink" href="#temporal-redirect" title="Permanent link">¶</a></h3>
|
||||
<h3 id="temporal-redirect">Temporal Redirect<a class="headerlink" href="#temporal-redirect" title="Permanent link"> ¶</a></h3>
|
||||
<p>This annotation allows you to return a temporal redirect (Return Code 302) instead of sending data to the upstream. For example <code class="codehilite">nginx.ingress.kubernetes.io/temporal-redirect: https://www.google.com</code> would redirect everything to Google with a Return Code of 302 (Moved Temporarily)</p>
|
||||
<h3 id="ssl-passthrough">SSL Passthrough<a class="headerlink" href="#ssl-passthrough" title="Permanent link">¶</a></h3>
|
||||
<h3 id="ssl-passthrough">SSL Passthrough<a class="headerlink" href="#ssl-passthrough" title="Permanent link"> ¶</a></h3>
|
||||
<p>The annotation <code class="codehilite">nginx.ingress.kubernetes.io/ssl-passthrough</code> instructs the controller to send TLS connections directly
|
||||
to the backend instead of letting NGINX decrypt the communication. See also <a href="../../tls/#ssl-passthrough">TLS/HTTPS</a> in
|
||||
the User guide.</p>
|
||||
|
|
@ -2707,17 +2703,17 @@ the User guide.</p>
|
|||
<p>Because SSL Passthrough works on layer 4 of the OSI model (TCP) and not on the layer 7 (HTTP), using SSL Passthrough
|
||||
invalidates all the other annotations set on an Ingress object.</p>
|
||||
</div>
|
||||
<h3 id="service-upstream">Service Upstream<a class="headerlink" href="#service-upstream" title="Permanent link">¶</a></h3>
|
||||
<h3 id="service-upstream">Service Upstream<a class="headerlink" href="#service-upstream" title="Permanent link"> ¶</a></h3>
|
||||
<p>By default the NGINX ingress controller uses a list of all endpoints (Pod IP/port) in the NGINX upstream configuration.</p>
|
||||
<p>The <code class="codehilite">nginx.ingress.kubernetes.io/service-upstream</code> annotation disables that behavior and instead uses a single upstream in NGINX, the service's Cluster IP and port.</p>
|
||||
<p>This can be desirable for things like zero-downtime deployments as it reduces the need to reload NGINX configuration when Pods come up and down. See issue <a href="https://github.com/kubernetes/ingress-nginx/issues/257">#257</a>.</p>
|
||||
<h4 id="known-issues">Known Issues<a class="headerlink" href="#known-issues" title="Permanent link">¶</a></h4>
|
||||
<h4 id="known-issues">Known Issues<a class="headerlink" href="#known-issues" title="Permanent link"> ¶</a></h4>
|
||||
<p>If the <code class="codehilite">service-upstream</code> annotation is specified the following things should be taken into consideration:</p>
|
||||
<ul>
|
||||
<li>Sticky Sessions will not work as only round-robin load balancing is supported.</li>
|
||||
<li>The <code class="codehilite">proxy_next_upstream</code> directive will not have any effect meaning on error the request will not be dispatched to another upstream.</li>
|
||||
</ul>
|
||||
<h3 id="server-side-https-enforcement-through-redirect">Server-side HTTPS enforcement through redirect<a class="headerlink" href="#server-side-https-enforcement-through-redirect" title="Permanent link">¶</a></h3>
|
||||
<h3 id="server-side-https-enforcement-through-redirect">Server-side HTTPS enforcement through redirect<a class="headerlink" href="#server-side-https-enforcement-through-redirect" title="Permanent link"> ¶</a></h3>
|
||||
<p>By default the controller redirects (308) to HTTPS if TLS is enabled for that ingress.
|
||||
If you want to disable this behavior globally, you can use <code class="codehilite">ssl-redirect: "false"</code> in the NGINX <a href="../configmap/#ssl-redirect">ConfigMap</a>.</p>
|
||||
<p>To configure this feature for specific ingress resources, you can use the <code class="codehilite">nginx.ingress.kubernetes.io/ssl-redirect: "false"</code>
|
||||
|
|
@ -2725,7 +2721,7 @@ annotation in the particular resource.</p>
|
|||
<p>When using SSL offloading outside of cluster (e.g. AWS ELB) it may be useful to enforce a redirect to HTTPS
|
||||
even when there is no TLS certificate available.
|
||||
This can be achieved by using the <code class="codehilite">nginx.ingress.kubernetes.io/force-ssl-redirect: "true"</code> annotation in the particular resource.</p>
|
||||
<h3 id="redirect-fromto-www">Redirect from/to www<a class="headerlink" href="#redirect-fromto-www" title="Permanent link">¶</a></h3>
|
||||
<h3 id="redirect-fromto-www">Redirect from/to www<a class="headerlink" href="#redirect-fromto-www" title="Permanent link"> ¶</a></h3>
|
||||
<p>In some scenarios is required to redirect from <code class="codehilite">www.domain.com</code> to <code class="codehilite">domain.com</code> or vice versa.
|
||||
To enable this feature use the annotation <code class="codehilite">nginx.ingress.kubernetes.io/from-to-www-redirect: "true"</code></p>
|
||||
<div class="admonition attention">
|
||||
|
|
@ -2736,7 +2732,7 @@ To enable this feature use the annotation <code class="codehilite">nginx.ingress
|
|||
<p class="admonition-title">Attention</p>
|
||||
<p>For HTTPS to HTTPS redirects is mandatory the SSL Certificate defined in the Secret, located in the TLS section of Ingress, contains both FQDN in the common name of the certificate.</p>
|
||||
</div>
|
||||
<h3 id="whitelist-source-range">Whitelist source range<a class="headerlink" href="#whitelist-source-range" title="Permanent link">¶</a></h3>
|
||||
<h3 id="whitelist-source-range">Whitelist source range<a class="headerlink" href="#whitelist-source-range" title="Permanent link"> ¶</a></h3>
|
||||
<p>You can specify allowed client IP source ranges through the <code class="codehilite">nginx.ingress.kubernetes.io/whitelist-source-range</code> annotation.
|
||||
The value is a comma separated list of <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">CIDRs</a>, e.g. <code class="codehilite">10.0.0.0/24,172.10.0.1</code>.</p>
|
||||
<p>To configure this setting globally for all Ingress rules, the <code class="codehilite">whitelist-source-range</code> value may be set in the <a href="../configmap/#whitelist-source-range">NGINX ConfigMap</a>.</p>
|
||||
|
|
@ -2744,7 +2740,7 @@ The value is a comma separated list of <a href="https://en.wikipedia.org/wiki/Cl
|
|||
<p class="admonition-title">Note</p>
|
||||
<p>Adding an annotation to an Ingress rule overrides any global restriction.</p>
|
||||
</div>
|
||||
<h3 id="custom-timeouts">Custom timeouts<a class="headerlink" href="#custom-timeouts" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-timeouts">Custom timeouts<a class="headerlink" href="#custom-timeouts" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using the configuration configmap it is possible to set the default global timeout for connections to the upstream servers.
|
||||
In some scenarios is required to have different values. To allow this we provide annotations that allows this customization:</p>
|
||||
<ul>
|
||||
|
|
@ -2756,26 +2752,26 @@ In some scenarios is required to have different values. To allow this we provide
|
|||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-next-upstream-tries</code></li>
|
||||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-request-buffering</code></li>
|
||||
</ul>
|
||||
<h3 id="proxy-redirect">Proxy redirect<a class="headerlink" href="#proxy-redirect" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-redirect">Proxy redirect<a class="headerlink" href="#proxy-redirect" title="Permanent link"> ¶</a></h3>
|
||||
<p>With the annotations <code class="codehilite">nginx.ingress.kubernetes.io/proxy-redirect-from</code> and <code class="codehilite">nginx.ingress.kubernetes.io/proxy-redirect-to</code> it is possible to
|
||||
set the text that should be changed in the <code class="codehilite">Location</code> and <code class="codehilite">Refresh</code> header fields of a <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect">proxied server response</a></p>
|
||||
<p>Setting "off" or "default" in the annotation <code class="codehilite">nginx.ingress.kubernetes.io/proxy-redirect-from</code> disables <code class="codehilite">nginx.ingress.kubernetes.io/proxy-redirect-to</code>,
|
||||
otherwise, both annotations must be used in unison. Note that each annotation must be a string without spaces.</p>
|
||||
<p>By default the value of each annotation is "off".</p>
|
||||
<h3 id="custom-max-body-size">Custom max body size<a class="headerlink" href="#custom-max-body-size" title="Permanent link">¶</a></h3>
|
||||
<h3 id="custom-max-body-size">Custom max body size<a class="headerlink" href="#custom-max-body-size" title="Permanent link"> ¶</a></h3>
|
||||
<p>For NGINX, an 413 error will be returned to the client when the size in a request exceeds the maximum allowed size of the client request body. This size can be configured by the parameter <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size"><code class="codehilite">client_max_body_size</code></a>.</p>
|
||||
<p>To configure this setting globally for all Ingress rules, the <code class="codehilite">proxy-body-size</code> value may be set in the <a href="../configmap/#proxy-body-size">NGINX ConfigMap</a>.
|
||||
To use custom values in an Ingress rule define these annotation:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-body-size</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">8m</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="proxy-cookie-domain">Proxy cookie domain<a class="headerlink" href="#proxy-cookie-domain" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-cookie-domain">Proxy cookie domain<a class="headerlink" href="#proxy-cookie-domain" title="Permanent link"> ¶</a></h3>
|
||||
<p>Sets a text that <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain">should be changed in the domain attribute</a> of the "Set-Cookie" header fields of a proxied server response.</p>
|
||||
<p>To configure this setting globally for all Ingress rules, the <code class="codehilite">proxy-cookie-domain</code> value may be set in the <a href="../configmap/#proxy-cookie-domain">NGINX ConfigMap</a>.</p>
|
||||
<h3 id="proxy-cookie-path">Proxy cookie path<a class="headerlink" href="#proxy-cookie-path" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-cookie-path">Proxy cookie path<a class="headerlink" href="#proxy-cookie-path" title="Permanent link"> ¶</a></h3>
|
||||
<p>Sets a text that <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path">should be changed in the path attribute</a> of the "Set-Cookie" header fields of a proxied server response.</p>
|
||||
<p>To configure this setting globally for all Ingress rules, the <code class="codehilite">proxy-cookie-path</code> value may be set in the <a href="../configmap/#proxy-cookie-path">NGINX ConfigMap</a>.</p>
|
||||
<h3 id="proxy-buffering">Proxy buffering<a class="headerlink" href="#proxy-buffering" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-buffering">Proxy buffering<a class="headerlink" href="#proxy-buffering" title="Permanent link"> ¶</a></h3>
|
||||
<p>Enable or disable proxy buffering <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering"><code class="codehilite">proxy_buffering</code></a>.
|
||||
By default proxy buffering is disabled in the NGINX config.</p>
|
||||
<p>To configure this setting globally for all Ingress rules, the <code class="codehilite">proxy-buffering</code> value may be set in the <a href="../configmap/#proxy-buffering">NGINX ConfigMap</a>.
|
||||
|
|
@ -2783,60 +2779,60 @@ To use custom values in an Ingress rule define these annotation:</p>
|
|||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-buffering</span><span class="p">:</span> <span class="s">"on"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="proxy-buffers-number">Proxy buffers Number<a class="headerlink" href="#proxy-buffers-number" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-buffers-number">Proxy buffers Number<a class="headerlink" href="#proxy-buffers-number" title="Permanent link"> ¶</a></h3>
|
||||
<p>Sets the number of the buffers in <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers"><code class="codehilite">proxy_buffers</code></a> used for reading the first part of the response received from the proxied server.
|
||||
By default proxy buffers number is set as 4</p>
|
||||
<p>To configure this setting globally, set <code class="codehilite">proxy-buffers-number</code> in <a href="../configmap/#proxy-buffers-number">NGINX ConfigMap</a>. To use custom values in an Ingress rule, define this annotation:
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-buffers-number</span><span class="p">:</span> <span class="s">"4"</span>
|
||||
</pre></div></p>
|
||||
<h3 id="proxy-buffer-size">Proxy buffer size<a class="headerlink" href="#proxy-buffer-size" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-buffer-size">Proxy buffer size<a class="headerlink" href="#proxy-buffer-size" title="Permanent link"> ¶</a></h3>
|
||||
<p>Sets the size of the buffer <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size"><code class="codehilite">proxy_buffer_size</code></a> used for reading the first part of the response received from the proxied server.
|
||||
By default proxy buffer size is set as "4k"</p>
|
||||
<p>To configure this setting globally, set <code class="codehilite">proxy-buffer-size</code> in <a href="../configmap/#proxy-buffer-size">NGINX ConfigMap</a>. To use custom values in an Ingress rule, define this annotation:
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-buffer-size</span><span class="p">:</span> <span class="s">"8k"</span>
|
||||
</pre></div></p>
|
||||
<h3 id="proxy-max-temp-file-size">Proxy max temp file size<a class="headerlink" href="#proxy-max-temp-file-size" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-max-temp-file-size">Proxy max temp file size<a class="headerlink" href="#proxy-max-temp-file-size" title="Permanent link"> ¶</a></h3>
|
||||
<p>When <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering"><code class="codehilite">buffering</code></a> of responses from the proxied server is enabled, and the whole response does not fit into the buffers set by the <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size"><code class="codehilite">proxy_buffer_size</code></a> and <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers"><code class="codehilite">proxy_buffers</code></a> directives, a part of the response can be saved to a temporary file. This directive sets the maximum <code class="codehilite">size</code> of the temporary file setting the <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size"><code class="codehilite">proxy_max_temp_file_size</code></a>. The size of data written to the temporary file at a time is set by the <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_temp_file_write_size"><code class="codehilite">proxy_temp_file_write_size</code></a> directive.</p>
|
||||
<p>The zero value disables buffering of responses to temporary files.</p>
|
||||
<p>To use custom values in an Ingress rule, define this annotation:
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-max-temp-file-size</span><span class="p">:</span> <span class="s">"1024m"</span>
|
||||
</pre></div></p>
|
||||
<h3 id="proxy-http-version">Proxy HTTP version<a class="headerlink" href="#proxy-http-version" title="Permanent link">¶</a></h3>
|
||||
<h3 id="proxy-http-version">Proxy HTTP version<a class="headerlink" href="#proxy-http-version" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using this annotation sets the <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version"><code class="codehilite">proxy_http_version</code></a> that the Nginx reverse proxy will use to communicate with the backend.
|
||||
By default this is set to "1.1".</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/proxy-http-version</span><span class="p">:</span> <span class="s">"1.0"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="ssl-ciphers">SSL ciphers<a class="headerlink" href="#ssl-ciphers" title="Permanent link">¶</a></h3>
|
||||
<h3 id="ssl-ciphers">SSL ciphers<a class="headerlink" href="#ssl-ciphers" title="Permanent link"> ¶</a></h3>
|
||||
<p>Specifies the <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers">enabled ciphers</a>.</p>
|
||||
<p>Using this annotation will set the <code class="codehilite">ssl_ciphers</code> directive at the server level. This configuration is active for all the paths in the host.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/ssl-ciphers</span><span class="p">:</span> <span class="s">"ALL:!aNULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="connection-proxy-header">Connection proxy header<a class="headerlink" href="#connection-proxy-header" title="Permanent link">¶</a></h3>
|
||||
<h3 id="connection-proxy-header">Connection proxy header<a class="headerlink" href="#connection-proxy-header" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using this annotation will override the default connection header set by NGINX.
|
||||
To use custom values in an Ingress rule, define the annotation:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/connection-proxy-header</span><span class="p">:</span> <span class="s">"keep-alive"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="enable-access-log">Enable Access Log<a class="headerlink" href="#enable-access-log" title="Permanent link">¶</a></h3>
|
||||
<h3 id="enable-access-log">Enable Access Log<a class="headerlink" href="#enable-access-log" title="Permanent link"> ¶</a></h3>
|
||||
<p>Access logs are enabled by default, but in some scenarios access logs might be required to be disabled for a given
|
||||
ingress. To do this, use the annotation:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/enable-access-log</span><span class="p">:</span> <span class="s">"false"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="enable-rewrite-log">Enable Rewrite Log<a class="headerlink" href="#enable-rewrite-log" title="Permanent link">¶</a></h3>
|
||||
<h3 id="enable-rewrite-log">Enable Rewrite Log<a class="headerlink" href="#enable-rewrite-log" title="Permanent link"> ¶</a></h3>
|
||||
<p>Rewrite logs are not enabled by default. In some scenarios it could be required to enable NGINX rewrite logs.
|
||||
Note that rewrite logs are sent to the error_log file at the notice level. To enable this feature use the annotation:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/enable-rewrite-log</span><span class="p">:</span> <span class="s">"true"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="x-forwarded-prefix-header">X-Forwarded-Prefix Header<a class="headerlink" href="#x-forwarded-prefix-header" title="Permanent link">¶</a></h3>
|
||||
<h3 id="x-forwarded-prefix-header">X-Forwarded-Prefix Header<a class="headerlink" href="#x-forwarded-prefix-header" title="Permanent link"> ¶</a></h3>
|
||||
<p>To add the non-standard <code class="codehilite">X-Forwarded-Prefix</code> header to the upstream request with a string value, the following annotation can be used:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/x-forwarded-prefix</span><span class="p">:</span> <span class="s">"/path"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="lua-resty-waf">Lua Resty WAF<a class="headerlink" href="#lua-resty-waf" title="Permanent link">¶</a></h3>
|
||||
<h3 id="lua-resty-waf">Lua Resty WAF<a class="headerlink" href="#lua-resty-waf" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using <code class="codehilite">lua-resty-waf-*</code> annotations we can enable and control the <a href="https://github.com/p0pr0ck5/lua-resty-waf">lua-resty-waf</a>
|
||||
Web Application Firewall per location.</p>
|
||||
<p>Following configuration will enable the WAF for the paths defined in the corresponding ingress:</p>
|
||||
|
|
@ -2873,7 +2869,7 @@ Reference for this <a href="https://github.com/p0pr0ck5/lua-resty-waf/issues/166
|
|||
</pre></div>
|
||||
|
||||
<p>For details on how to write WAF rules, please refer to <a href="https://github.com/p0pr0ck5/lua-resty-waf">https://github.com/p0pr0ck5/lua-resty-waf</a>.</p>
|
||||
<h3 id="modsecurity">ModSecurity<a class="headerlink" href="#modsecurity" title="Permanent link">¶</a></h3>
|
||||
<h3 id="modsecurity">ModSecurity<a class="headerlink" href="#modsecurity" title="Permanent link"> ¶</a></h3>
|
||||
<p><a href="http://modsecurity.org/">ModSecurity</a> is an OpenSource Web Application firewall. It can be enabled for a particular set
|
||||
of ingress locations. The ModSecurity module must first be enabled by enabling ModSecurity in the
|
||||
<a href="../configmap/#enable-modsecurity">ConfigMap</a>. Note this will enable ModSecurity for all paths, and each path
|
||||
|
|
@ -2902,7 +2898,7 @@ statement:
|
|||
<span class="l l-Scalar l-Scalar-Plain">Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">Include /etc/nginx/modsecurity/modsecurity.conf</span>
|
||||
</pre></div></p>
|
||||
<h3 id="influxdb">InfluxDB<a class="headerlink" href="#influxdb" title="Permanent link">¶</a></h3>
|
||||
<h3 id="influxdb">InfluxDB<a class="headerlink" href="#influxdb" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using <code class="codehilite">influxdb-*</code> annotations we can monitor requests passing through a Location by sending them to an InfluxDB backend exposing the UDP socket
|
||||
using the <a href="https://github.com/influxdata/nginx-influxdb-module/">nginx-influxdb-module</a>.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/enable-influxdb</span><span class="p">:</span> <span class="s">"true"</span>
|
||||
|
|
@ -2921,7 +2917,7 @@ Prometheus, etc.. (recommended)</li>
|
|||
</ul>
|
||||
<p>It's important to remember that there's no DNS resolver at this stage so you will have to configure
|
||||
an ip address to <code class="codehilite">nginx.ingress.kubernetes.io/influxdb-host</code>. If you deploy Influx or Telegraf as sidecar (another container in the same pod) this becomes straightforward since you can directly use <code class="codehilite">127.0.0.1</code>.</p>
|
||||
<h3 id="backend-protocol">Backend Protocol<a class="headerlink" href="#backend-protocol" title="Permanent link">¶</a></h3>
|
||||
<h3 id="backend-protocol">Backend Protocol<a class="headerlink" href="#backend-protocol" title="Permanent link"> ¶</a></h3>
|
||||
<p>Using <code class="codehilite">backend-protocol</code> annotations is possible to indicate how NGINX should communicate with the backend service. (Replaces <code class="codehilite">secure-backends</code> in older versions)
|
||||
Valid Values: HTTP, HTTPS, GRPC, GRPCS and AJP</p>
|
||||
<p>By default NGINX uses <code class="codehilite">HTTP</code>.</p>
|
||||
|
|
@ -2929,7 +2925,7 @@ Valid Values: HTTP, HTTPS, GRPC, GRPCS and AJP</p>
|
|||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/backend-protocol</span><span class="p">:</span> <span class="s">"HTTPS"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="use-regex">Use Regex<a class="headerlink" href="#use-regex" title="Permanent link">¶</a></h3>
|
||||
<h3 id="use-regex">Use Regex<a class="headerlink" href="#use-regex" title="Permanent link"> ¶</a></h3>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
</div>
|
||||
|
|
@ -2944,12 +2940,12 @@ Valid Values: HTTP, HTTPS, GRPC, GRPCS and AJP</p>
|
|||
<p>When this annotation is set to <code class="codehilite">true</code>, the case insensitive regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a> will be enforced on ALL paths for a given host regardless of what Ingress they are defined on.</p>
|
||||
<p>Additionally, if the <a href="#rewrite"><code class="codehilite">rewrite-target</code> annotation</a> is used on any Ingress for a given host, then the case insensitive regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a> will be enforced on ALL paths for a given host regardless of what Ingress they are defined on.</p>
|
||||
<p>Please read about <a href="../../ingress-path-matching/">ingress path matching</a> before using this modifier.</p>
|
||||
<h3 id="satisfy">Satisfy<a class="headerlink" href="#satisfy" title="Permanent link">¶</a></h3>
|
||||
<h3 id="satisfy">Satisfy<a class="headerlink" href="#satisfy" title="Permanent link"> ¶</a></h3>
|
||||
<p>By default, a request would need to satisfy all authentication requirements in order to be allowed. By using this annotation, requests that satisfy either any or all authentication requirements are allowed, based on the configuration value.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/satisfy</span><span class="p">:</span> <span class="s">"any"</span>
|
||||
</pre></div>
|
||||
|
||||
<h3 id="mirror">Mirror<a class="headerlink" href="#mirror" title="Permanent link">¶</a></h3>
|
||||
<h3 id="mirror">Mirror<a class="headerlink" href="#mirror" title="Permanent link"> ¶</a></h3>
|
||||
<p>Enables a request to be mirrored to a mirror backend. Responses by mirror backends are ignored. This feature is useful, to see how requests will react in "test" backends.</p>
|
||||
<p>You can mirror a request to the <code class="codehilite">/mirror</code> path on your ingress, by applying the below:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">nginx.ingress.kubernetes.io/mirror-uri</span><span class="p">:</span> <span class="s">"/mirror"</span>
|
||||
|
|
|
|||
|
|
@ -766,6 +766,13 @@
|
|||
http2-max-requests
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#http2-max-concurrent-streams" class="md-nav__link">
|
||||
http2-max-concurrent-streams
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
|
|
@ -2343,6 +2350,13 @@
|
|||
http2-max-requests
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#http2-max-concurrent-streams" class="md-nav__link">
|
||||
http2-max-concurrent-streams
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
|
|
@ -3197,7 +3211,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/nginx-configuration/configmap.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="configmaps">ConfigMaps<a class="headerlink" href="#configmaps" title="Permanent link">¶</a></h1>
|
||||
<h1 id="configmaps">ConfigMaps<a class="headerlink" href="#configmaps" title="Permanent link"> ¶</a></h1>
|
||||
<p>ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable.</p>
|
||||
<p>The ConfigMap API resource stores configuration data as key-value pairs. The data provides the configurations for system
|
||||
components for the nginx-controller.</p>
|
||||
|
|
@ -3215,7 +3229,7 @@ This means that we want a value with boolean values we need to quote the values,
|
|||
Same for numbers, like "100".</p>
|
||||
<p>"Slice" types (defined below as <code class="codehilite">[]string</code> or <code class="codehilite">[]int</code> can be provided as a comma-delimited string.</p>
|
||||
</div>
|
||||
<h2 id="configuration-options">Configuration options<a class="headerlink" href="#configuration-options" title="Permanent link">¶</a></h2>
|
||||
<h2 id="configuration-options">Configuration options<a class="headerlink" href="#configuration-options" title="Permanent link"> ¶</a></h2>
|
||||
<p>The following table shows a configuration option's name, type, and the default value:</p>
|
||||
<table>
|
||||
<thead>
|
||||
|
|
@ -3347,6 +3361,11 @@ Same for numbers, like "100".</p>
|
|||
<td align="left">1000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><a href="#http2-max-concurrent-streams">http2-max-concurrent-streams</a></td>
|
||||
<td align="left">int</td>
|
||||
<td align="left">1000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><a href="#hsts">hsts</a></td>
|
||||
<td align="left">bool</td>
|
||||
<td align="left">"true"</td>
|
||||
|
|
@ -3948,83 +3967,87 @@ Same for numbers, like "100".</p>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="add-headers">add-headers<a class="headerlink" href="#add-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="add-headers">add-headers<a class="headerlink" href="#add-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets custom headers from named configmap before sending traffic to the client. See <a href="#proxy-set-headers">proxy-set-headers</a>. <a href="https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers">example</a></p>
|
||||
<h2 id="allow-backend-server-header">allow-backend-server-header<a class="headerlink" href="#allow-backend-server-header" title="Permanent link">¶</a></h2>
|
||||
<h2 id="allow-backend-server-header">allow-backend-server-header<a class="headerlink" href="#allow-backend-server-header" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables the return of the header Server from the backend instead of the generic nginx string. <em><strong>default:</strong></em> is disabled</p>
|
||||
<h2 id="hide-headers">hide-headers<a class="headerlink" href="#hide-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="hide-headers">hide-headers<a class="headerlink" href="#hide-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets additional header that will not be passed from the upstream server to the client response.
|
||||
<em><strong>default:</strong></em> empty</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header</a></p>
|
||||
<h2 id="access-log-params">access-log-params<a class="headerlink" href="#access-log-params" title="Permanent link">¶</a></h2>
|
||||
<h2 id="access-log-params">access-log-params<a class="headerlink" href="#access-log-params" title="Permanent link"> ¶</a></h2>
|
||||
<p>Additional params for access_log. For example, buffer=16k, gzip, flush=1m</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log">http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log</a></p>
|
||||
<h2 id="access-log-path">access-log-path<a class="headerlink" href="#access-log-path" title="Permanent link">¶</a></h2>
|
||||
<h2 id="access-log-path">access-log-path<a class="headerlink" href="#access-log-path" title="Permanent link"> ¶</a></h2>
|
||||
<p>Access log path. Goes to <code class="codehilite">/var/log/nginx/access.log</code> by default.</p>
|
||||
<p><strong>Note:</strong> the file <code class="codehilite">/var/log/nginx/access.log</code> is a symlink to <code class="codehilite">/dev/stdout</code></p>
|
||||
<h2 id="enable-access-log-for-default-backend">enable-access-log-for-default-backend<a class="headerlink" href="#enable-access-log-for-default-backend" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-access-log-for-default-backend">enable-access-log-for-default-backend<a class="headerlink" href="#enable-access-log-for-default-backend" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables logging access to default backend. <em><strong>default:</strong></em> is disabled.</p>
|
||||
<h2 id="error-log-path">error-log-path<a class="headerlink" href="#error-log-path" title="Permanent link">¶</a></h2>
|
||||
<h2 id="error-log-path">error-log-path<a class="headerlink" href="#error-log-path" title="Permanent link"> ¶</a></h2>
|
||||
<p>Error log path. Goes to <code class="codehilite">/var/log/nginx/error.log</code> by default.</p>
|
||||
<p><strong>Note:</strong> the file <code class="codehilite">/var/log/nginx/error.log</code> is a symlink to <code class="codehilite">/dev/stderr</code></p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/ngx_core_module.html#error_log">http://nginx.org/en/docs/ngx_core_module.html#error_log</a></p>
|
||||
<h2 id="enable-modsecurity">enable-modsecurity<a class="headerlink" href="#enable-modsecurity" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-modsecurity">enable-modsecurity<a class="headerlink" href="#enable-modsecurity" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables the modsecurity module for NGINX. <em><strong>default:</strong></em> is disabled</p>
|
||||
<h2 id="enable-owasp-modsecurity-crs">enable-owasp-modsecurity-crs<a class="headerlink" href="#enable-owasp-modsecurity-crs" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-owasp-modsecurity-crs">enable-owasp-modsecurity-crs<a class="headerlink" href="#enable-owasp-modsecurity-crs" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables the OWASP ModSecurity Core Rule Set (CRS). <em><strong>default:</strong></em> is disabled</p>
|
||||
<h2 id="modsecurity-snippet">modsecurity-snippet<a class="headerlink" href="#modsecurity-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="modsecurity-snippet">modsecurity-snippet<a class="headerlink" href="#modsecurity-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds custom rules to modsecurity section of nginx configration</p>
|
||||
<h2 id="client-header-buffer-size">client-header-buffer-size<a class="headerlink" href="#client-header-buffer-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="client-header-buffer-size">client-header-buffer-size<a class="headerlink" href="#client-header-buffer-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Allows to configure a custom buffer size for reading client request header.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size">http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size</a></p>
|
||||
<h2 id="client-header-timeout">client-header-timeout<a class="headerlink" href="#client-header-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="client-header-timeout">client-header-timeout<a class="headerlink" href="#client-header-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Defines a timeout for reading client request header, in seconds.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_timeout">http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_timeout</a></p>
|
||||
<h2 id="client-body-buffer-size">client-body-buffer-size<a class="headerlink" href="#client-body-buffer-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="client-body-buffer-size">client-body-buffer-size<a class="headerlink" href="#client-body-buffer-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets buffer size for reading client request body.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size">http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size</a></p>
|
||||
<h2 id="client-body-timeout">client-body-timeout<a class="headerlink" href="#client-body-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="client-body-timeout">client-body-timeout<a class="headerlink" href="#client-body-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Defines a timeout for reading client request body, in seconds.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout">http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout</a></p>
|
||||
<h2 id="disable-access-log">disable-access-log<a class="headerlink" href="#disable-access-log" title="Permanent link">¶</a></h2>
|
||||
<h2 id="disable-access-log">disable-access-log<a class="headerlink" href="#disable-access-log" title="Permanent link"> ¶</a></h2>
|
||||
<p>Disables the Access Log from the entire Ingress Controller. <em><strong>default:</strong></em> '"false"'</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log">http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log</a></p>
|
||||
<h2 id="disable-ipv6">disable-ipv6<a class="headerlink" href="#disable-ipv6" title="Permanent link">¶</a></h2>
|
||||
<h2 id="disable-ipv6">disable-ipv6<a class="headerlink" href="#disable-ipv6" title="Permanent link"> ¶</a></h2>
|
||||
<p>Disable listening on IPV6. <em><strong>default:</strong></em> <code class="codehilite">false</code>; IPv6 listening is enabled</p>
|
||||
<h2 id="disable-ipv6-dns">disable-ipv6-dns<a class="headerlink" href="#disable-ipv6-dns" title="Permanent link">¶</a></h2>
|
||||
<h2 id="disable-ipv6-dns">disable-ipv6-dns<a class="headerlink" href="#disable-ipv6-dns" title="Permanent link"> ¶</a></h2>
|
||||
<p>Disable IPV6 for nginx DNS resolver. <em><strong>default:</strong></em> <code class="codehilite">false</code>; IPv6 resolving enabled.</p>
|
||||
<h2 id="enable-underscores-in-headers">enable-underscores-in-headers<a class="headerlink" href="#enable-underscores-in-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-underscores-in-headers">enable-underscores-in-headers<a class="headerlink" href="#enable-underscores-in-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables underscores in header names. <em><strong>default:</strong></em> is disabled</p>
|
||||
<h2 id="ignore-invalid-headers">ignore-invalid-headers<a class="headerlink" href="#ignore-invalid-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ignore-invalid-headers">ignore-invalid-headers<a class="headerlink" href="#ignore-invalid-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Set if header fields with invalid names should be ignored.
|
||||
<em><strong>default:</strong></em> is enabled</p>
|
||||
<h2 id="retry-non-idempotent">retry-non-idempotent<a class="headerlink" href="#retry-non-idempotent" title="Permanent link">¶</a></h2>
|
||||
<h2 id="retry-non-idempotent">retry-non-idempotent<a class="headerlink" href="#retry-non-idempotent" title="Permanent link"> ¶</a></h2>
|
||||
<p>Since 1.9.13 NGINX will not retry non-idempotent requests (POST, LOCK, PATCH) in case of an error in the upstream server. The previous behavior can be restored using the value "true".</p>
|
||||
<h2 id="error-log-level">error-log-level<a class="headerlink" href="#error-log-level" title="Permanent link">¶</a></h2>
|
||||
<h2 id="error-log-level">error-log-level<a class="headerlink" href="#error-log-level" title="Permanent link"> ¶</a></h2>
|
||||
<p>Configures the logging level of errors. Log levels above are listed in the order of increasing severity.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/ngx_core_module.html#error_log">http://nginx.org/en/docs/ngx_core_module.html#error_log</a></p>
|
||||
<h2 id="http2-max-field-size">http2-max-field-size<a class="headerlink" href="#http2-max-field-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http2-max-field-size">http2-max-field-size<a class="headerlink" href="#http2-max-field-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Limits the maximum size of an HPACK-compressed request header field.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_field_size">https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_field_size</a></p>
|
||||
<h2 id="http2-max-header-size">http2-max-header-size<a class="headerlink" href="#http2-max-header-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http2-max-header-size">http2-max-header-size<a class="headerlink" href="#http2-max-header-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Limits the maximum size of the entire request header list after HPACK decompression.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_header_size">https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_header_size</a></p>
|
||||
<h2 id="http2-max-requests">http2-max-requests<a class="headerlink" href="#http2-max-requests" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http2-max-requests">http2-max-requests<a class="headerlink" href="#http2-max-requests" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum number of requests (including push requests) that can be served through one HTTP/2 connection, after which the next client request will lead to connection closing and the need of establishing a new connection.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests">http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests</a></p>
|
||||
<h2 id="hsts">hsts<a class="headerlink" href="#hsts" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http2-max-concurrent-streams">http2-max-concurrent-streams<a class="headerlink" href="#http2-max-concurrent-streams" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum number of concurrent HTTP/2 streams in a connection.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_concurrent_streams">http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_concurrent_streams</a></p>
|
||||
<h2 id="hsts">hsts<a class="headerlink" href="#hsts" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables the header HSTS in servers running SSL.
|
||||
HTTP Strict Transport Security (often abbreviated as HSTS) is a security feature (HTTP header) that tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. It provides protection against protocol downgrade attacks and cookie theft.</p>
|
||||
<p><em>References:</em></p>
|
||||
|
|
@ -4032,27 +4055,27 @@ HTTP Strict Transport Security (often abbreviated as HSTS) is a security feature
|
|||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security">https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security</a></li>
|
||||
<li><a href="https://blog.qualys.com/securitylabs/2016/03/28/the-importance-of-a-proper-http-strict-transport-security-implementation-on-your-web-server">https://blog.qualys.com/securitylabs/2016/03/28/the-importance-of-a-proper-http-strict-transport-security-implementation-on-your-web-server</a></li>
|
||||
</ul>
|
||||
<h2 id="hsts-include-subdomains">hsts-include-subdomains<a class="headerlink" href="#hsts-include-subdomains" title="Permanent link">¶</a></h2>
|
||||
<h2 id="hsts-include-subdomains">hsts-include-subdomains<a class="headerlink" href="#hsts-include-subdomains" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables the use of HSTS in all the subdomains of the server-name.</p>
|
||||
<h2 id="hsts-max-age">hsts-max-age<a class="headerlink" href="#hsts-max-age" title="Permanent link">¶</a></h2>
|
||||
<h2 id="hsts-max-age">hsts-max-age<a class="headerlink" href="#hsts-max-age" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the time, in seconds, that the browser should remember that this site is only to be accessed using HTTPS.</p>
|
||||
<h2 id="hsts-preload">hsts-preload<a class="headerlink" href="#hsts-preload" title="Permanent link">¶</a></h2>
|
||||
<h2 id="hsts-preload">hsts-preload<a class="headerlink" href="#hsts-preload" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables the preload attribute in the HSTS feature (when it is enabled) dd</p>
|
||||
<h2 id="keep-alive">keep-alive<a class="headerlink" href="#keep-alive" title="Permanent link">¶</a></h2>
|
||||
<h2 id="keep-alive">keep-alive<a class="headerlink" href="#keep-alive" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the time during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout">http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout</a></p>
|
||||
<h2 id="keep-alive-requests">keep-alive-requests<a class="headerlink" href="#keep-alive-requests" title="Permanent link">¶</a></h2>
|
||||
<h2 id="keep-alive-requests">keep-alive-requests<a class="headerlink" href="#keep-alive-requests" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum number of requests that can be served through one keep-alive connection.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests">http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests</a></p>
|
||||
<h2 id="large-client-header-buffers">large-client-header-buffers<a class="headerlink" href="#large-client-header-buffers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="large-client-header-buffers">large-client-header-buffers<a class="headerlink" href="#large-client-header-buffers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum number and size of buffers used for reading large client request header. <em><strong>default:</strong></em> 4 8k</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers">http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers</a></p>
|
||||
<h2 id="log-format-escape-json">log-format-escape-json<a class="headerlink" href="#log-format-escape-json" title="Permanent link">¶</a></h2>
|
||||
<h2 id="log-format-escape-json">log-format-escape-json<a class="headerlink" href="#log-format-escape-json" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets if the escape parameter allows JSON ("true") or default characters escaping in variables ("false") Sets the nginx <a href="http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format">log format</a>.</p>
|
||||
<h2 id="log-format-upstream">log-format-upstream<a class="headerlink" href="#log-format-upstream" title="Permanent link">¶</a></h2>
|
||||
<h2 id="log-format-upstream">log-format-upstream<a class="headerlink" href="#log-format-upstream" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the nginx <a href="http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format">log format</a>.
|
||||
Example for json output:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="err">log-format-upstream:</span> <span class="err">'</span><span class="p">{</span><span class="nt">"time"</span><span class="p">:</span> <span class="s2">"$time_iso8601"</span><span class="p">,</span> <span class="nt">"remote_addr"</span><span class="p">:</span> <span class="s2">"$proxy_protocol_addr"</span><span class="p">,</span> <span class="nt">"x-forward-for"</span><span class="p">:</span> <span class="s2">"$proxy_add_x_forwarded_for"</span><span class="p">,</span> <span class="nt">"request_id"</span><span class="p">:</span> <span class="s2">"$req_id"</span><span class="p">,</span>
|
||||
|
|
@ -4062,14 +4085,14 @@ Example for json output:</p>
|
|||
</pre></div>
|
||||
|
||||
<p>Please check the <a href="../log-format/">log-format</a> for definition of each field.</p>
|
||||
<h2 id="log-format-stream">log-format-stream<a class="headerlink" href="#log-format-stream" title="Permanent link">¶</a></h2>
|
||||
<h2 id="log-format-stream">log-format-stream<a class="headerlink" href="#log-format-stream" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the nginx <a href="https://nginx.org/en/docs/stream/ngx_stream_log_module.html#log_format">stream format</a>.</p>
|
||||
<h2 id="enable-multi-accept">enable-multi-accept<a class="headerlink" href="#enable-multi-accept" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-multi-accept">enable-multi-accept<a class="headerlink" href="#enable-multi-accept" title="Permanent link"> ¶</a></h2>
|
||||
<p>If disabled, a worker process will accept one new connection at a time. Otherwise, a worker process will accept all new connections at a time.
|
||||
<em><strong>default:</strong></em> true</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/ngx_core_module.html#multi_accept">http://nginx.org/en/docs/ngx_core_module.html#multi_accept</a></p>
|
||||
<h2 id="max-worker-connections">max-worker-connections<a class="headerlink" href="#max-worker-connections" title="Permanent link">¶</a></h2>
|
||||
<h2 id="max-worker-connections">max-worker-connections<a class="headerlink" href="#max-worker-connections" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/ngx_core_module.html#worker_connections">maximum number of simultaneous connections</a> that can be opened by each worker process.
|
||||
0 will use the value of <a href="#max-worker-open-files">max-worker-open-files</a>.
|
||||
<em><strong>default:</strong></em> 16384</p>
|
||||
|
|
@ -4077,57 +4100,57 @@ Example for json output:</p>
|
|||
<p class="admonition-title">Tip</p>
|
||||
<p>Using 0 in scenarios of high load improves performance at the cost of increasing RAM utilization (even on idle).</p>
|
||||
</div>
|
||||
<h2 id="max-worker-open-files">max-worker-open-files<a class="headerlink" href="#max-worker-open-files" title="Permanent link">¶</a></h2>
|
||||
<h2 id="max-worker-open-files">max-worker-open-files<a class="headerlink" href="#max-worker-open-files" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile">maximum number of files</a> that can be opened by each worker process.
|
||||
The default of 0 means "max open files (system's limit) / <a href="#worker-processes">worker-processes</a> - 1024".
|
||||
<em><strong>default:</strong></em> 0</p>
|
||||
<h2 id="map-hash-bucket-size">map-hash-bucket-size<a class="headerlink" href="#map-hash-bucket-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="map-hash-bucket-size">map-hash-bucket-size<a class="headerlink" href="#map-hash-bucket-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the bucket size for the <a href="http://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size">map variables hash tables</a>. The details of setting up hash tables are provided in a separate <a href="http://nginx.org/en/docs/hash.html">document</a>.</p>
|
||||
<h2 id="proxy-real-ip-cidr">proxy-real-ip-cidr<a class="headerlink" href="#proxy-real-ip-cidr" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-real-ip-cidr">proxy-real-ip-cidr<a class="headerlink" href="#proxy-real-ip-cidr" title="Permanent link"> ¶</a></h2>
|
||||
<p>If use-proxy-protocol is enabled, proxy-real-ip-cidr defines the default the IP/network address of your external load balancer.</p>
|
||||
<h2 id="proxy-set-headers">proxy-set-headers<a class="headerlink" href="#proxy-set-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-set-headers">proxy-set-headers<a class="headerlink" href="#proxy-set-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets custom headers from named configmap before sending traffic to backends. The value format is namespace/name. See <a href="https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers">example</a></p>
|
||||
<h2 id="server-name-hash-max-size">server-name-hash-max-size<a class="headerlink" href="#server-name-hash-max-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="server-name-hash-max-size">server-name-hash-max-size<a class="headerlink" href="#server-name-hash-max-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum size of the <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size">server names hash tables</a> used in server names,map directive’s values, MIME types, names of request header strings, etc.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/hash.html">http://nginx.org/en/docs/hash.html</a></p>
|
||||
<h2 id="server-name-hash-bucket-size">server-name-hash-bucket-size<a class="headerlink" href="#server-name-hash-bucket-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="server-name-hash-bucket-size">server-name-hash-bucket-size<a class="headerlink" href="#server-name-hash-bucket-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the size of the bucket for the server names hash tables.</p>
|
||||
<p><em>References:</em></p>
|
||||
<ul>
|
||||
<li><a href="http://nginx.org/en/docs/hash.html">http://nginx.org/en/docs/hash.html</a></li>
|
||||
<li><a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size">http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size</a></li>
|
||||
</ul>
|
||||
<h2 id="proxy-headers-hash-max-size">proxy-headers-hash-max-size<a class="headerlink" href="#proxy-headers-hash-max-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-headers-hash-max-size">proxy-headers-hash-max-size<a class="headerlink" href="#proxy-headers-hash-max-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum size of the proxy headers hash tables.</p>
|
||||
<p><em>References:</em></p>
|
||||
<ul>
|
||||
<li><a href="http://nginx.org/en/docs/hash.html">http://nginx.org/en/docs/hash.html</a></li>
|
||||
<li><a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_max_size">https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_max_size</a></li>
|
||||
</ul>
|
||||
<h2 id="reuse-port">reuse-port<a class="headerlink" href="#reuse-port" title="Permanent link">¶</a></h2>
|
||||
<h2 id="reuse-port">reuse-port<a class="headerlink" href="#reuse-port" title="Permanent link"> ¶</a></h2>
|
||||
<p>Instructs NGINX to create an individual listening socket for each worker process (using the SO_REUSEPORT socket option), allowing a kernel to distribute incoming connections between worker processes
|
||||
<em><strong>default:</strong></em> true</p>
|
||||
<h2 id="proxy-headers-hash-bucket-size">proxy-headers-hash-bucket-size<a class="headerlink" href="#proxy-headers-hash-bucket-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-headers-hash-bucket-size">proxy-headers-hash-bucket-size<a class="headerlink" href="#proxy-headers-hash-bucket-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the size of the bucket for the proxy headers hash tables.</p>
|
||||
<p><em>References:</em></p>
|
||||
<ul>
|
||||
<li><a href="http://nginx.org/en/docs/hash.html">http://nginx.org/en/docs/hash.html</a></li>
|
||||
<li><a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_bucket_size">https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_bucket_size</a></li>
|
||||
</ul>
|
||||
<h2 id="server-tokens">server-tokens<a class="headerlink" href="#server-tokens" title="Permanent link">¶</a></h2>
|
||||
<h2 id="server-tokens">server-tokens<a class="headerlink" href="#server-tokens" title="Permanent link"> ¶</a></h2>
|
||||
<p>Send NGINX Server header in responses and display NGINX version in error pages. <em><strong>default:</strong></em> is enabled</p>
|
||||
<h2 id="ssl-ciphers">ssl-ciphers<a class="headerlink" href="#ssl-ciphers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-ciphers">ssl-ciphers<a class="headerlink" href="#ssl-ciphers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers">ciphers</a> list to enable. The ciphers are specified in the format understood by the OpenSSL library.</p>
|
||||
<p>The default cipher list is:
|
||||
<code class="codehilite">ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256</code>.</p>
|
||||
<p>The ordering of a ciphersuite is very important because it decides which algorithms are going to be selected in priority. The recommendation above prioritizes algorithms that provide perfect <a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Forward_Secrecy">forward secrecy</a>.</p>
|
||||
<p>Please check the <a href="https://mozilla.github.io/server-side-tls/ssl-config-generator/">Mozilla SSL Configuration Generator</a>.</p>
|
||||
<h2 id="ssl-ecdh-curve">ssl-ecdh-curve<a class="headerlink" href="#ssl-ecdh-curve" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-ecdh-curve">ssl-ecdh-curve<a class="headerlink" href="#ssl-ecdh-curve" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies a curve for ECDHE ciphers.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve">http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve</a></p>
|
||||
<h2 id="ssl-dh-param">ssl-dh-param<a class="headerlink" href="#ssl-dh-param" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-dh-param">ssl-dh-param<a class="headerlink" href="#ssl-dh-param" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the name of the secret that contains Diffie-Hellman key to help with "Perfect Forward Secrecy".</p>
|
||||
<p><em>References:</em></p>
|
||||
<ul>
|
||||
|
|
@ -4135,67 +4158,67 @@ The default of 0 means "max open files (system's limit) / <a href="#worker-proce
|
|||
<li><a href="https://wiki.mozilla.org/Security/Server_Side_TLS#DHE_handshake_and_dhparam">https://wiki.mozilla.org/Security/Server_Side_TLS#DHE_handshake_and_dhparam</a></li>
|
||||
<li><a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam">http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam</a></li>
|
||||
</ul>
|
||||
<h2 id="ssl-protocols">ssl-protocols<a class="headerlink" href="#ssl-protocols" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-protocols">ssl-protocols<a class="headerlink" href="#ssl-protocols" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols">SSL protocols</a> to use. The default is: <code class="codehilite">TLSv1.2</code>.</p>
|
||||
<p>Please check the result of the configuration using <code class="codehilite">https://ssllabs.com/ssltest/analyze.html</code> or <code class="codehilite">https://testssl.sh</code>.</p>
|
||||
<h2 id="ssl-early-data">ssl-early-data<a class="headerlink" href="#ssl-early-data" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-early-data">ssl-early-data<a class="headerlink" href="#ssl-early-data" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables TLS 1.3 <a href="https://tools.ietf.org/html/rfc8446#section-2.3">early data</a></p>
|
||||
<p>This requires <code class="codehilite">ssl-protocols</code> to have <code class="codehilite">TLSv1.3</code> enabled.</p>
|
||||
<p><a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data">ssl_early_data</a>. The default is: <code class="codehilite">false</code>.</p>
|
||||
<h2 id="ssl-session-cache">ssl-session-cache<a class="headerlink" href="#ssl-session-cache" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-session-cache">ssl-session-cache<a class="headerlink" href="#ssl-session-cache" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables the use of shared <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache">SSL cache</a> among worker processes.</p>
|
||||
<h2 id="ssl-session-cache-size">ssl-session-cache-size<a class="headerlink" href="#ssl-session-cache-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-session-cache-size">ssl-session-cache-size<a class="headerlink" href="#ssl-session-cache-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the size of the <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache">SSL shared session cache</a> between all worker processes.</p>
|
||||
<h2 id="ssl-session-tickets">ssl-session-tickets<a class="headerlink" href="#ssl-session-tickets" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-session-tickets">ssl-session-tickets<a class="headerlink" href="#ssl-session-tickets" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables session resumption through <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets">TLS session tickets</a>.</p>
|
||||
<h2 id="ssl-session-ticket-key">ssl-session-ticket-key<a class="headerlink" href="#ssl-session-ticket-key" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-session-ticket-key">ssl-session-ticket-key<a class="headerlink" href="#ssl-session-ticket-key" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the secret key used to encrypt and decrypt TLS session tickets. The value must be a valid base64 string.
|
||||
To create a ticket: <code class="codehilite">openssl rand 80 | openssl enc -A -base64</code></p>
|
||||
<p><a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets">TLS session ticket-key</a>, by default, a randomly generated key is used.</p>
|
||||
<h2 id="ssl-session-timeout">ssl-session-timeout<a class="headerlink" href="#ssl-session-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-session-timeout">ssl-session-timeout<a class="headerlink" href="#ssl-session-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the time during which a client may <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_timeout">reuse the session</a> parameters stored in a cache.</p>
|
||||
<h2 id="ssl-buffer-size">ssl-buffer-size<a class="headerlink" href="#ssl-buffer-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-buffer-size">ssl-buffer-size<a class="headerlink" href="#ssl-buffer-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the size of the <a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size">SSL buffer</a> used for sending data. The default of 4k helps NGINX to improve TLS Time To First Byte (TTTFB).</p>
|
||||
<p><em>References:</em>
|
||||
<a href="https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/">https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/</a></p>
|
||||
<h2 id="use-proxy-protocol">use-proxy-protocol<a class="headerlink" href="#use-proxy-protocol" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-proxy-protocol">use-proxy-protocol<a class="headerlink" href="#use-proxy-protocol" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables the <a href="https://www.nginx.com/resources/admin-guide/proxy-protocol/">PROXY protocol</a> to receive client connection (real IP address) information passed through proxy servers and load balancers such as HAProxy and Amazon Elastic Load Balancer (ELB).</p>
|
||||
<h2 id="proxy-protocol-header-timeout">proxy-protocol-header-timeout<a class="headerlink" href="#proxy-protocol-header-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-protocol-header-timeout">proxy-protocol-header-timeout<a class="headerlink" href="#proxy-protocol-header-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the timeout value for receiving the proxy-protocol headers. The default of 5 seconds prevents the TLS passthrough handler from waiting indefinitely on a dropped connection.
|
||||
<em><strong>default:</strong></em> 5s</p>
|
||||
<h2 id="use-gzip">use-gzip<a class="headerlink" href="#use-gzip" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-gzip">use-gzip<a class="headerlink" href="#use-gzip" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables compression of HTTP responses using the <a href="http://nginx.org/en/docs/http/ngx_http_gzip_module.html">"gzip" module</a>. MIME types to compress are controlled by <a href="#gzip-types">gzip-types</a>. <em><strong>default:</strong></em> true</p>
|
||||
<h2 id="use-geoip">use-geoip<a class="headerlink" href="#use-geoip" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-geoip">use-geoip<a class="headerlink" href="#use-geoip" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables <a href="http://nginx.org/en/docs/http/ngx_http_geoip_module.html">"geoip" module</a> that creates variables with values depending on the client IP address, using the precompiled MaxMind databases.
|
||||
<em><strong>default:</strong></em> true</p>
|
||||
<blockquote>
|
||||
<p><strong>Note:</strong> MaxMind legacy databases are discontinued and will not receive updates after 2019-01-02, cf. <a href="https://support.maxmind.com/geolite-legacy-discontinuation-notice/">discontinuation notice</a>. Consider <a href="#use-geoip2">use-geoip2</a> below.</p>
|
||||
</blockquote>
|
||||
<h2 id="use-geoip2">use-geoip2<a class="headerlink" href="#use-geoip2" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-geoip2">use-geoip2<a class="headerlink" href="#use-geoip2" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables the <a href="https://github.com/leev/ngx_http_geoip2_module">geoip2 module</a> for NGINX.
|
||||
<em><strong>default:</strong></em> false</p>
|
||||
<h2 id="enable-brotli">enable-brotli<a class="headerlink" href="#enable-brotli" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-brotli">enable-brotli<a class="headerlink" href="#enable-brotli" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables compression of HTTP responses using the <a href="https://github.com/google/ngx_brotli">"brotli" module</a>.
|
||||
The default mime type list to compress is: <code class="codehilite">application/xml+rss application/atom+xml application/javascript application/x-javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component</code>. <em><strong>default:</strong></em> is disabled</p>
|
||||
<blockquote>
|
||||
<p><strong>Note:</strong> Brotli does not works in Safari < 11. For more information see <a href="https://caniuse.com/#feat=brotli">https://caniuse.com/#feat=brotli</a></p>
|
||||
</blockquote>
|
||||
<h2 id="brotli-level">brotli-level<a class="headerlink" href="#brotli-level" title="Permanent link">¶</a></h2>
|
||||
<h2 id="brotli-level">brotli-level<a class="headerlink" href="#brotli-level" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the Brotli Compression Level that will be used. <em><strong>default:</strong></em> 4</p>
|
||||
<h2 id="brotli-types">brotli-types<a class="headerlink" href="#brotli-types" title="Permanent link">¶</a></h2>
|
||||
<h2 id="brotli-types">brotli-types<a class="headerlink" href="#brotli-types" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the MIME Types that will be compressed on-the-fly by brotli.
|
||||
<em><strong>default:</strong></em> <code class="codehilite">application/xml+rss application/atom+xml application/javascript application/x-javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component</code></p>
|
||||
<h2 id="use-http2">use-http2<a class="headerlink" href="#use-http2" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-http2">use-http2<a class="headerlink" href="#use-http2" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables <a href="http://nginx.org/en/docs/http/ngx_http_v2_module.html">HTTP/2</a> support in secure connections.</p>
|
||||
<h2 id="gzip-level">gzip-level<a class="headerlink" href="#gzip-level" title="Permanent link">¶</a></h2>
|
||||
<h2 id="gzip-level">gzip-level<a class="headerlink" href="#gzip-level" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the gzip Compression Level that will be used. <em><strong>default:</strong></em> 5</p>
|
||||
<h2 id="gzip-types">gzip-types<a class="headerlink" href="#gzip-types" title="Permanent link">¶</a></h2>
|
||||
<h2 id="gzip-types">gzip-types<a class="headerlink" href="#gzip-types" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the MIME types in addition to "text/html" to compress. The special value "*" matches any MIME type. Responses with the "text/html" type are always compressed if <code class="codehilite">[use-gzip](#use-gzip)</code> is enabled.
|
||||
<em><strong>default:</strong></em> <code class="codehilite">application/atom+xml application/javascript application/x-javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component</code>.</p>
|
||||
<h2 id="worker-processes">worker-processes<a class="headerlink" href="#worker-processes" title="Permanent link">¶</a></h2>
|
||||
<h2 id="worker-processes">worker-processes<a class="headerlink" href="#worker-processes" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the number of <a href="http://nginx.org/en/docs/ngx_core_module.html#worker_processes">worker processes</a>.
|
||||
The default of "auto" means number of available CPU cores.</p>
|
||||
<h2 id="worker-cpu-affinity">worker-cpu-affinity<a class="headerlink" href="#worker-cpu-affinity" title="Permanent link">¶</a></h2>
|
||||
<h2 id="worker-cpu-affinity">worker-cpu-affinity<a class="headerlink" href="#worker-cpu-affinity" title="Permanent link"> ¶</a></h2>
|
||||
<p>Binds worker processes to the sets of CPUs. <a href="http://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity">worker_cpu_affinity</a>.
|
||||
By default worker processes are not bound to any specific CPUs. The value can be:</p>
|
||||
<ul>
|
||||
|
|
@ -4203,9 +4226,9 @@ By default worker processes are not bound to any specific CPUs. The value can be
|
|||
<li>cpumask: e.g. <code class="codehilite">0001 0010 0100 1000</code> to bind processes to specific cpus.</li>
|
||||
<li>auto: binding worker processes automatically to available CPUs.</li>
|
||||
</ul>
|
||||
<h2 id="worker-shutdown-timeout">worker-shutdown-timeout<a class="headerlink" href="#worker-shutdown-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="worker-shutdown-timeout">worker-shutdown-timeout<a class="headerlink" href="#worker-shutdown-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a timeout for Nginx to <a href="http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout">wait for worker to gracefully shutdown</a>. <em><strong>default:</strong></em> "240s"</p>
|
||||
<h2 id="load-balance">load-balance<a class="headerlink" href="#load-balance" title="Permanent link">¶</a></h2>
|
||||
<h2 id="load-balance">load-balance<a class="headerlink" href="#load-balance" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the algorithm to use for load balancing.
|
||||
The value can either be:</p>
|
||||
<ul>
|
||||
|
|
@ -4219,148 +4242,148 @@ The value can either be:</p>
|
|||
</ul>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/load_balancing.html">http://nginx.org/en/docs/http/load_balancing.html</a></p>
|
||||
<h2 id="variables-hash-bucket-size">variables-hash-bucket-size<a class="headerlink" href="#variables-hash-bucket-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="variables-hash-bucket-size">variables-hash-bucket-size<a class="headerlink" href="#variables-hash-bucket-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the bucket size for the variables hash table.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size">http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size</a></p>
|
||||
<h2 id="variables-hash-max-size">variables-hash-max-size<a class="headerlink" href="#variables-hash-max-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="variables-hash-max-size">variables-hash-max-size<a class="headerlink" href="#variables-hash-max-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum size of the variables hash table.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size">http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size</a></p>
|
||||
<h2 id="upstream-keepalive-connections">upstream-keepalive-connections<a class="headerlink" href="#upstream-keepalive-connections" title="Permanent link">¶</a></h2>
|
||||
<h2 id="upstream-keepalive-connections">upstream-keepalive-connections<a class="headerlink" href="#upstream-keepalive-connections" title="Permanent link"> ¶</a></h2>
|
||||
<p>Activates the cache for connections to upstream servers. The connections parameter sets the maximum number of idle
|
||||
keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is
|
||||
exceeded, the least recently used connections are closed.
|
||||
<em><strong>default:</strong></em> 32</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive">http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive</a></p>
|
||||
<h2 id="upstream-keepalive-timeout">upstream-keepalive-timeout<a class="headerlink" href="#upstream-keepalive-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="upstream-keepalive-timeout">upstream-keepalive-timeout<a class="headerlink" href="#upstream-keepalive-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a timeout during which an idle keepalive connection to an upstream server will stay open.
|
||||
<em><strong>default:</strong></em> 60</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout">http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout</a></p>
|
||||
<h2 id="upstream-keepalive-requests">upstream-keepalive-requests<a class="headerlink" href="#upstream-keepalive-requests" title="Permanent link">¶</a></h2>
|
||||
<h2 id="upstream-keepalive-requests">upstream-keepalive-requests<a class="headerlink" href="#upstream-keepalive-requests" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum number of requests that can be served through one keepalive connection. After the maximum number of
|
||||
requests is made, the connection is closed.
|
||||
<em><strong>default:</strong></em> 100</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests">http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests</a></p>
|
||||
<h2 id="limit-conn-zone-variable">limit-conn-zone-variable<a class="headerlink" href="#limit-conn-zone-variable" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limit-conn-zone-variable">limit-conn-zone-variable<a class="headerlink" href="#limit-conn-zone-variable" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets parameters for a shared memory zone that will keep states for various keys of <a href="http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone">limit_conn_zone</a>. The default of "$binary_remote_addr" variable’s size is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses.</p>
|
||||
<h2 id="proxy-stream-timeout">proxy-stream-timeout<a class="headerlink" href="#proxy-stream-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-stream-timeout">proxy-stream-timeout<a class="headerlink" href="#proxy-stream-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the timeout between two successive read or write operations on client or proxied server connections. If no data is transmitted within this time, the connection is closed.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_timeout">http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_timeout</a></p>
|
||||
<h2 id="proxy-stream-responses">proxy-stream-responses<a class="headerlink" href="#proxy-stream-responses" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-stream-responses">proxy-stream-responses<a class="headerlink" href="#proxy-stream-responses" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the number of datagrams expected from the proxied server in response to the client request if the UDP protocol is used.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_responses">http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_responses</a></p>
|
||||
<h2 id="bind-address">bind-address<a class="headerlink" href="#bind-address" title="Permanent link">¶</a></h2>
|
||||
<h2 id="bind-address">bind-address<a class="headerlink" href="#bind-address" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the addresses on which the server will accept requests instead of *. It should be noted that these addresses must exist in the runtime environment or the controller will crash loop.</p>
|
||||
<h2 id="use-forwarded-headers">use-forwarded-headers<a class="headerlink" href="#use-forwarded-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="use-forwarded-headers">use-forwarded-headers<a class="headerlink" href="#use-forwarded-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>If true, NGINX passes the incoming <code class="codehilite">X-Forwarded-*</code> headers to upstreams. Use this option when NGINX is behind another L7 proxy / load balancer that is setting these headers.</p>
|
||||
<p>If false, NGINX ignores incoming <code class="codehilite">X-Forwarded-*</code> headers, filling them with the request information it sees. Use this option if NGINX is exposed directly to the internet, or it's behind a L3/packet-based load balancer that doesn't alter the source IP in the packets.</p>
|
||||
<h2 id="forwarded-for-header">forwarded-for-header<a class="headerlink" href="#forwarded-for-header" title="Permanent link">¶</a></h2>
|
||||
<h2 id="forwarded-for-header">forwarded-for-header<a class="headerlink" href="#forwarded-for-header" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the header field for identifying the originating IP address of a client. <em><strong>default:</strong></em> X-Forwarded-For</p>
|
||||
<h2 id="compute-full-forwarded-for">compute-full-forwarded-for<a class="headerlink" href="#compute-full-forwarded-for" title="Permanent link">¶</a></h2>
|
||||
<h2 id="compute-full-forwarded-for">compute-full-forwarded-for<a class="headerlink" href="#compute-full-forwarded-for" title="Permanent link"> ¶</a></h2>
|
||||
<p>Append the remote address to the X-Forwarded-For header instead of replacing it. When this option is enabled, the upstream application is responsible for extracting the client IP based on its own list of trusted proxies.</p>
|
||||
<h2 id="proxy-add-original-uri-header">proxy-add-original-uri-header<a class="headerlink" href="#proxy-add-original-uri-header" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-add-original-uri-header">proxy-add-original-uri-header<a class="headerlink" href="#proxy-add-original-uri-header" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds an X-Original-Uri header with the original request URI to the backend request</p>
|
||||
<h2 id="generate-request-id">generate-request-id<a class="headerlink" href="#generate-request-id" title="Permanent link">¶</a></h2>
|
||||
<h2 id="generate-request-id">generate-request-id<a class="headerlink" href="#generate-request-id" title="Permanent link"> ¶</a></h2>
|
||||
<p>Ensures that X-Request-ID is defaulted to a random value, if no X-Request-ID is present in the request</p>
|
||||
<h2 id="enable-opentracing">enable-opentracing<a class="headerlink" href="#enable-opentracing" title="Permanent link">¶</a></h2>
|
||||
<h2 id="enable-opentracing">enable-opentracing<a class="headerlink" href="#enable-opentracing" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables the nginx Opentracing extension. <em><strong>default:</strong></em> is disabled</p>
|
||||
<p><em>References:</em>
|
||||
<a href="https://github.com/opentracing-contrib/nginx-opentracing">https://github.com/opentracing-contrib/nginx-opentracing</a></p>
|
||||
<h2 id="zipkin-collector-host">zipkin-collector-host<a class="headerlink" href="#zipkin-collector-host" title="Permanent link">¶</a></h2>
|
||||
<h2 id="zipkin-collector-host">zipkin-collector-host<a class="headerlink" href="#zipkin-collector-host" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the host to use when uploading traces. It must be a valid URL.</p>
|
||||
<h2 id="zipkin-collector-port">zipkin-collector-port<a class="headerlink" href="#zipkin-collector-port" title="Permanent link">¶</a></h2>
|
||||
<h2 id="zipkin-collector-port">zipkin-collector-port<a class="headerlink" href="#zipkin-collector-port" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the port to use when uploading traces. <em><strong>default:</strong></em> 9411</p>
|
||||
<h2 id="zipkin-service-name">zipkin-service-name<a class="headerlink" href="#zipkin-service-name" title="Permanent link">¶</a></h2>
|
||||
<h2 id="zipkin-service-name">zipkin-service-name<a class="headerlink" href="#zipkin-service-name" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the service name to use for any traces created. <em><strong>default:</strong></em> nginx</p>
|
||||
<h2 id="zipkin-sample-rate">zipkin-sample-rate<a class="headerlink" href="#zipkin-sample-rate" title="Permanent link">¶</a></h2>
|
||||
<h2 id="zipkin-sample-rate">zipkin-sample-rate<a class="headerlink" href="#zipkin-sample-rate" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies sample rate for any traces created. <em><strong>default:</strong></em> 1.0</p>
|
||||
<h2 id="jaeger-collector-host">jaeger-collector-host<a class="headerlink" href="#jaeger-collector-host" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-collector-host">jaeger-collector-host<a class="headerlink" href="#jaeger-collector-host" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the host to use when uploading traces. It must be a valid URL.</p>
|
||||
<h2 id="jaeger-collector-port">jaeger-collector-port<a class="headerlink" href="#jaeger-collector-port" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-collector-port">jaeger-collector-port<a class="headerlink" href="#jaeger-collector-port" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the port to use when uploading traces. <em><strong>default:</strong></em> 6831</p>
|
||||
<h2 id="jaeger-service-name">jaeger-service-name<a class="headerlink" href="#jaeger-service-name" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-service-name">jaeger-service-name<a class="headerlink" href="#jaeger-service-name" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the service name to use for any traces created. <em><strong>default:</strong></em> nginx</p>
|
||||
<h2 id="jaeger-sampler-type">jaeger-sampler-type<a class="headerlink" href="#jaeger-sampler-type" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-sampler-type">jaeger-sampler-type<a class="headerlink" href="#jaeger-sampler-type" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the sampler to be used when sampling traces. The available samplers are: const, probabilistic, ratelimiting, remote. <em><strong>default:</strong></em> const</p>
|
||||
<h2 id="jaeger-sampler-param">jaeger-sampler-param<a class="headerlink" href="#jaeger-sampler-param" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-sampler-param">jaeger-sampler-param<a class="headerlink" href="#jaeger-sampler-param" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the argument to be passed to the sampler constructor. Must be a number.
|
||||
For const this should be 0 to never sample and 1 to always sample. <em><strong>default:</strong></em> 1</p>
|
||||
<h2 id="jaeger-sampler-host">jaeger-sampler-host<a class="headerlink" href="#jaeger-sampler-host" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-sampler-host">jaeger-sampler-host<a class="headerlink" href="#jaeger-sampler-host" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the custom remote sampler host to be passed to the sampler constructor. Must be a valid URL.
|
||||
Leave blank to use default value (localhost). <em><strong>default:</strong></em> http://127.0.0.1</p>
|
||||
<h2 id="jaeger-sampler-port">jaeger-sampler-port<a class="headerlink" href="#jaeger-sampler-port" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-sampler-port">jaeger-sampler-port<a class="headerlink" href="#jaeger-sampler-port" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the custom remote sampler port to be passed to the sampler constructor. Must be a number. <em><strong>default:</strong></em> 5778</p>
|
||||
<h2 id="jaeger-trace-context-header-name">jaeger-trace-context-header-name<a class="headerlink" href="#jaeger-trace-context-header-name" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-trace-context-header-name">jaeger-trace-context-header-name<a class="headerlink" href="#jaeger-trace-context-header-name" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the header name used for passing trace context. <em><strong>default:</strong></em> uber-trace-id</p>
|
||||
<h2 id="jaeger-debug-header">jaeger-debug-header<a class="headerlink" href="#jaeger-debug-header" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-debug-header">jaeger-debug-header<a class="headerlink" href="#jaeger-debug-header" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the header name used for force sampling. <em><strong>default:</strong></em> jaeger-debug-id</p>
|
||||
<h2 id="jaeger-baggage-header">jaeger-baggage-header<a class="headerlink" href="#jaeger-baggage-header" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-baggage-header">jaeger-baggage-header<a class="headerlink" href="#jaeger-baggage-header" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the header name used to submit baggage if there is no root span. <em><strong>default:</strong></em> jaeger-baggage</p>
|
||||
<h2 id="jaeger-tracer-baggage-header-prefix">jaeger-tracer-baggage-header-prefix<a class="headerlink" href="#jaeger-tracer-baggage-header-prefix" title="Permanent link">¶</a></h2>
|
||||
<h2 id="jaeger-tracer-baggage-header-prefix">jaeger-tracer-baggage-header-prefix<a class="headerlink" href="#jaeger-tracer-baggage-header-prefix" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies the header prefix used to propagate baggage. <em><strong>default:</strong></em> uberctx-</p>
|
||||
<h2 id="main-snippet">main-snippet<a class="headerlink" href="#main-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="main-snippet">main-snippet<a class="headerlink" href="#main-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds custom configuration to the main section of the nginx configuration.</p>
|
||||
<h2 id="http-snippet">http-snippet<a class="headerlink" href="#http-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http-snippet">http-snippet<a class="headerlink" href="#http-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds custom configuration to the http section of the nginx configuration.</p>
|
||||
<h2 id="server-snippet">server-snippet<a class="headerlink" href="#server-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="server-snippet">server-snippet<a class="headerlink" href="#server-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds custom configuration to all the servers in the nginx configuration.</p>
|
||||
<h2 id="location-snippet">location-snippet<a class="headerlink" href="#location-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="location-snippet">location-snippet<a class="headerlink" href="#location-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Adds custom configuration to all the locations in the nginx configuration.</p>
|
||||
<p>You can not use this to add new locations that proxy to the Kubernetes pods, as the snippet does not have access to the Go template functions. If you want to add custom locations you will have to <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/">provide your own nginx.tmpl</a>.</p>
|
||||
<h2 id="custom-http-errors">custom-http-errors<a class="headerlink" href="#custom-http-errors" title="Permanent link">¶</a></h2>
|
||||
<h2 id="custom-http-errors">custom-http-errors<a class="headerlink" href="#custom-http-errors" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables which HTTP codes should be passed for processing with the <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page">error_page directive</a></p>
|
||||
<p>Setting at least one code also enables <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors">proxy_intercept_errors</a> which are required to process error_page.</p>
|
||||
<p>Example usage: <code class="codehilite">custom-http-errors: 404,415</code></p>
|
||||
<h2 id="proxy-body-size">proxy-body-size<a class="headerlink" href="#proxy-body-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-body-size">proxy-body-size<a class="headerlink" href="#proxy-body-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the maximum allowed size of the client request body.
|
||||
See NGINX <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size">client_max_body_size</a>.</p>
|
||||
<h2 id="proxy-connect-timeout">proxy-connect-timeout<a class="headerlink" href="#proxy-connect-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-connect-timeout">proxy-connect-timeout<a class="headerlink" href="#proxy-connect-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the timeout for <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout">establishing a connection with a proxied server</a>. It should be noted that this timeout cannot usually exceed 75 seconds.</p>
|
||||
<h2 id="proxy-read-timeout">proxy-read-timeout<a class="headerlink" href="#proxy-read-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-read-timeout">proxy-read-timeout<a class="headerlink" href="#proxy-read-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the timeout in seconds for <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout">reading a response from the proxied server</a>. The timeout is set only between two successive read operations, not for the transmission of the whole response.</p>
|
||||
<h2 id="proxy-send-timeout">proxy-send-timeout<a class="headerlink" href="#proxy-send-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-send-timeout">proxy-send-timeout<a class="headerlink" href="#proxy-send-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the timeout in seconds for <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout">transmitting a request to the proxied server</a>. The timeout is set only between two successive write operations, not for the transmission of the whole request.</p>
|
||||
<h2 id="proxy-buffers-number">proxy-buffers-number<a class="headerlink" href="#proxy-buffers-number" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-buffers-number">proxy-buffers-number<a class="headerlink" href="#proxy-buffers-number" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the number of the buffer used for <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers">reading the first part of the response</a> received from the proxied server. This part usually contains a small response header.</p>
|
||||
<h2 id="proxy-buffer-size">proxy-buffer-size<a class="headerlink" href="#proxy-buffer-size" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-buffer-size">proxy-buffer-size<a class="headerlink" href="#proxy-buffer-size" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the size of the buffer used for <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size">reading the first part of the response</a> received from the proxied server. This part usually contains a small response header.</p>
|
||||
<h2 id="proxy-cookie-path">proxy-cookie-path<a class="headerlink" href="#proxy-cookie-path" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-cookie-path">proxy-cookie-path<a class="headerlink" href="#proxy-cookie-path" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a text that <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path">should be changed in the path attribute</a> of the “Set-Cookie” header fields of a proxied server response.</p>
|
||||
<h2 id="proxy-cookie-domain">proxy-cookie-domain<a class="headerlink" href="#proxy-cookie-domain" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-cookie-domain">proxy-cookie-domain<a class="headerlink" href="#proxy-cookie-domain" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a text that <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain">should be changed in the domain attribute</a> of the “Set-Cookie” header fields of a proxied server response.</p>
|
||||
<h2 id="proxy-next-upstream">proxy-next-upstream<a class="headerlink" href="#proxy-next-upstream" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-next-upstream">proxy-next-upstream<a class="headerlink" href="#proxy-next-upstream" title="Permanent link"> ¶</a></h2>
|
||||
<p>Specifies in <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream">which cases</a> a request should be passed to the next server.</p>
|
||||
<h2 id="proxy-next-upstream-timeout">proxy-next-upstream-timeout<a class="headerlink" href="#proxy-next-upstream-timeout" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-next-upstream-timeout">proxy-next-upstream-timeout<a class="headerlink" href="#proxy-next-upstream-timeout" title="Permanent link"> ¶</a></h2>
|
||||
<p><a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout">Limits the time</a> in seconds during which a request can be passed to the next server.</p>
|
||||
<h2 id="proxy-next-upstream-tries">proxy-next-upstream-tries<a class="headerlink" href="#proxy-next-upstream-tries" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-next-upstream-tries">proxy-next-upstream-tries<a class="headerlink" href="#proxy-next-upstream-tries" title="Permanent link"> ¶</a></h2>
|
||||
<p>Limit the number of <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_tries">possible tries</a> a request should be passed to the next server.</p>
|
||||
<h2 id="proxy-redirect-from">proxy-redirect-from<a class="headerlink" href="#proxy-redirect-from" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-redirect-from">proxy-redirect-from<a class="headerlink" href="#proxy-redirect-from" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the original text that should be changed in the "Location" and "Refresh" header fields of a proxied server response. <em><strong>default:</strong></em> off</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect</a></p>
|
||||
<h2 id="proxy-request-buffering">proxy-request-buffering<a class="headerlink" href="#proxy-request-buffering" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-request-buffering">proxy-request-buffering<a class="headerlink" href="#proxy-request-buffering" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering">buffering of a client request body</a>.</p>
|
||||
<h2 id="ssl-redirect">ssl-redirect<a class="headerlink" href="#ssl-redirect" title="Permanent link">¶</a></h2>
|
||||
<h2 id="ssl-redirect">ssl-redirect<a class="headerlink" href="#ssl-redirect" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the global value of redirects (301) to HTTPS if the server has a TLS certificate (defined in an Ingress rule).
|
||||
<em><strong>default:</strong></em> "true"</p>
|
||||
<h2 id="whitelist-source-range">whitelist-source-range<a class="headerlink" href="#whitelist-source-range" title="Permanent link">¶</a></h2>
|
||||
<h2 id="whitelist-source-range">whitelist-source-range<a class="headerlink" href="#whitelist-source-range" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the default whitelisted IPs for each <code class="codehilite">server</code> block. This can be overwritten by an annotation on an Ingress rule.
|
||||
See <a href="http://nginx.org/en/docs/http/ngx_http_access_module.html">ngx_http_access_module</a>.</p>
|
||||
<h2 id="skip-access-log-urls">skip-access-log-urls<a class="headerlink" href="#skip-access-log-urls" title="Permanent link">¶</a></h2>
|
||||
<h2 id="skip-access-log-urls">skip-access-log-urls<a class="headerlink" href="#skip-access-log-urls" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a list of URLs that should not appear in the NGINX access log. This is useful with urls like <code class="codehilite">/health</code> or <code class="codehilite">health-check</code> that make "complex" reading the logs. <em><strong>default:</strong></em> is empty</p>
|
||||
<h2 id="limit-rate">limit-rate<a class="headerlink" href="#limit-rate" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limit-rate">limit-rate<a class="headerlink" href="#limit-rate" title="Permanent link"> ¶</a></h2>
|
||||
<p>Limits the rate of response transmission to a client. The rate is specified in bytes per second. The zero value disables rate limiting. The limit is set per a request, and so if a client simultaneously opens two connections, the overall rate will be twice as much as the specified limit.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate">http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate</a></p>
|
||||
<h2 id="limit-rate-after">limit-rate-after<a class="headerlink" href="#limit-rate-after" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limit-rate-after">limit-rate-after<a class="headerlink" href="#limit-rate-after" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the initial amount after which the further transmission of a response to a client will be rate limited.</p>
|
||||
<h2 id="lua-shared-dicts">lua-shared-dicts<a class="headerlink" href="#lua-shared-dicts" title="Permanent link">¶</a></h2>
|
||||
<h2 id="lua-shared-dicts">lua-shared-dicts<a class="headerlink" href="#lua-shared-dicts" title="Permanent link"> ¶</a></h2>
|
||||
<p>Customize default Lua shared dictionaries or define more. You can use the following syntax to do so:</p>
|
||||
<div class="codehilite"><pre><span></span>lua-shared-dicts: "<my dict name>: <my dict size>, [<my dict name>: <my dict size>], ..."
|
||||
</pre></div>
|
||||
|
|
@ -4372,7 +4395,7 @@ See <a href="http://nginx.org/en/docs/http/ngx_http_access_module.html">ngx_http
|
|||
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after">http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after</a></p>
|
||||
<h2 id="http-redirect-code">http-redirect-code<a class="headerlink" href="#http-redirect-code" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http-redirect-code">http-redirect-code<a class="headerlink" href="#http-redirect-code" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the HTTP status code to be used in redirects.
|
||||
Supported codes are <a href="https://developer.mozilla.org/docs/Web/HTTP/Status/301">301</a>,<a href="https://developer.mozilla.org/docs/Web/HTTP/Status/302">302</a>,<a href="https://developer.mozilla.org/docs/Web/HTTP/Status/307">307</a> and <a href="https://developer.mozilla.org/docs/Web/HTTP/Status/308">308</a>
|
||||
<em><strong>default:</strong></em> 308</p>
|
||||
|
|
@ -4380,58 +4403,58 @@ Supported codes are <a href="https://developer.mozilla.org/docs/Web/HTTP/Status/
|
|||
<p><strong>Why the default code is 308?</strong></p>
|
||||
<p><a href="https://tools.ietf.org/html/rfc7238">RFC 7238</a> was created to define the 308 (Permanent Redirect) status code that is similar to 301 (Moved Permanently) but it keeps the payload in the redirect. This is important if the we send a redirect in methods like POST.</p>
|
||||
</blockquote>
|
||||
<h2 id="proxy-buffering">proxy-buffering<a class="headerlink" href="#proxy-buffering" title="Permanent link">¶</a></h2>
|
||||
<h2 id="proxy-buffering">proxy-buffering<a class="headerlink" href="#proxy-buffering" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables or disables <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering">buffering of responses from the proxied server</a>.</p>
|
||||
<h2 id="limit-req-status-code">limit-req-status-code<a class="headerlink" href="#limit-req-status-code" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limit-req-status-code">limit-req-status-code<a class="headerlink" href="#limit-req-status-code" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status">status code to return in response to rejected requests</a>. <em><strong>default:</strong></em> 503</p>
|
||||
<h2 id="limit-conn-status-code">limit-conn-status-code<a class="headerlink" href="#limit-conn-status-code" title="Permanent link">¶</a></h2>
|
||||
<h2 id="limit-conn-status-code">limit-conn-status-code<a class="headerlink" href="#limit-conn-status-code" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the <a href="http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_status">status code to return in response to rejected connections</a>. <em><strong>default:</strong></em> 503</p>
|
||||
<h2 id="no-tls-redirect-locations">no-tls-redirect-locations<a class="headerlink" href="#no-tls-redirect-locations" title="Permanent link">¶</a></h2>
|
||||
<h2 id="no-tls-redirect-locations">no-tls-redirect-locations<a class="headerlink" href="#no-tls-redirect-locations" title="Permanent link"> ¶</a></h2>
|
||||
<p>A comma-separated list of locations on which http requests will never get redirected to their https counterpart.
|
||||
<em><strong>default:</strong></em> "/.well-known/acme-challenge"</p>
|
||||
<h2 id="global-auth-url">global-auth-url<a class="headerlink" href="#global-auth-url" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-url">global-auth-url<a class="headerlink" href="#global-auth-url" title="Permanent link"> ¶</a></h2>
|
||||
<p>A url to an existing service that provides authentication for all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-url</code>.
|
||||
Locations that should not get authenticated can be listed using <code class="codehilite">no-auth-locations</code> See <a href="#no-auth-locations">no-auth-locations</a>. In addition, each service can be excluded from authentication via annotation <code class="codehilite">enable-global-auth</code> set to "false".
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<p><em>References:</em> <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#external-authentication">https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#external-authentication</a></p>
|
||||
<h2 id="global-auth-method">global-auth-method<a class="headerlink" href="#global-auth-method" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-method">global-auth-method<a class="headerlink" href="#global-auth-method" title="Permanent link"> ¶</a></h2>
|
||||
<p>A HTTP method to use for an existing service that provides authentication for all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-method</code>.
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<h2 id="global-auth-signin">global-auth-signin<a class="headerlink" href="#global-auth-signin" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-signin">global-auth-signin<a class="headerlink" href="#global-auth-signin" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the location of the error page for an existing service that provides authentication for all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-signin</code>.
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<h2 id="global-auth-response-headers">global-auth-response-headers<a class="headerlink" href="#global-auth-response-headers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-response-headers">global-auth-response-headers<a class="headerlink" href="#global-auth-response-headers" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the headers to pass to backend once authentication request completes. Applied to all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-response-headers</code>.
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<h2 id="global-auth-request-redirect">global-auth-request-redirect<a class="headerlink" href="#global-auth-request-redirect" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-request-redirect">global-auth-request-redirect<a class="headerlink" href="#global-auth-request-redirect" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets the X-Auth-Request-Redirect header value. Applied to all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-request-redirect</code>.
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<h2 id="global-auth-snippet">global-auth-snippet<a class="headerlink" href="#global-auth-snippet" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-snippet">global-auth-snippet<a class="headerlink" href="#global-auth-snippet" title="Permanent link"> ¶</a></h2>
|
||||
<p>Sets a custom snippet to use with external authentication. Applied to all the locations.
|
||||
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-request-redirect</code>.
|
||||
<em><strong>default:</strong></em> ""</p>
|
||||
<h2 id="global-auth-cache-key">global-auth-cache-key<a class="headerlink" href="#global-auth-cache-key" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-cache-key">global-auth-cache-key<a class="headerlink" href="#global-auth-cache-key" title="Permanent link"> ¶</a></h2>
|
||||
<p>Enables caching for global auth requests. Specify a lookup key for auth responses, e.g. <code class="codehilite">$remote_user$http_authorization</code>.</p>
|
||||
<h2 id="global-auth-cache-duration">global-auth-cache-duration<a class="headerlink" href="#global-auth-cache-duration" title="Permanent link">¶</a></h2>
|
||||
<h2 id="global-auth-cache-duration">global-auth-cache-duration<a class="headerlink" href="#global-auth-cache-duration" title="Permanent link"> ¶</a></h2>
|
||||
<p>Set a caching time for auth responses based on their response codes, e.g. <code class="codehilite">200 202 30m</code>. See <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid">proxy_cache_valid</a> for details. You may specify multiple, comma-separated values: <code class="codehilite">200 202 10m, 401 5m</code>. defaults to <code class="codehilite">200 202 401 5m</code>.</p>
|
||||
<h2 id="no-auth-locations">no-auth-locations<a class="headerlink" href="#no-auth-locations" title="Permanent link">¶</a></h2>
|
||||
<h2 id="no-auth-locations">no-auth-locations<a class="headerlink" href="#no-auth-locations" title="Permanent link"> ¶</a></h2>
|
||||
<p>A comma-separated list of locations that should not get authenticated.
|
||||
<em><strong>default:</strong></em> "/.well-known/acme-challenge"</p>
|
||||
<h2 id="block-cidrs">block-cidrs<a class="headerlink" href="#block-cidrs" title="Permanent link">¶</a></h2>
|
||||
<h2 id="block-cidrs">block-cidrs<a class="headerlink" href="#block-cidrs" title="Permanent link"> ¶</a></h2>
|
||||
<p>A comma-separated list of IP addresses (or subnets), request from which have to be blocked globally.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_access_module.html#deny">http://nginx.org/en/docs/http/ngx_http_access_module.html#deny</a></p>
|
||||
<h2 id="block-user-agents">block-user-agents<a class="headerlink" href="#block-user-agents" title="Permanent link">¶</a></h2>
|
||||
<h2 id="block-user-agents">block-user-agents<a class="headerlink" href="#block-user-agents" title="Permanent link"> ¶</a></h2>
|
||||
<p>A comma-separated list of User-Agent, request from which have to be blocked globally.
|
||||
It's possible to use here full strings and regular expressions. More details about valid patterns can be found at <code class="codehilite">map</code> Nginx directive documentation.</p>
|
||||
<p><em>References:</em>
|
||||
<a href="http://nginx.org/en/docs/http/ngx_http_map_module.html#map">http://nginx.org/en/docs/http/ngx_http_map_module.html#map</a></p>
|
||||
<h2 id="block-referers">block-referers<a class="headerlink" href="#block-referers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="block-referers">block-referers<a class="headerlink" href="#block-referers" title="Permanent link"> ¶</a></h2>
|
||||
<p>A comma-separated list of Referers, request from which have to be blocked globally.
|
||||
It's possible to use here full strings and regular expressions. More details about valid patterns can be found at <code class="codehilite">map</code> Nginx directive documentation.</p>
|
||||
<p><em>References:</em>
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/nginx-configuration/custom-template.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="custom-nginx-template">Custom NGINX template<a class="headerlink" href="#custom-nginx-template" title="Permanent link">¶</a></h1>
|
||||
<h1 id="custom-nginx-template">Custom NGINX template<a class="headerlink" href="#custom-nginx-template" title="Permanent link"> ¶</a></h1>
|
||||
<p>The NGINX template is located in the file <code class="codehilite">/etc/nginx/template/nginx.tmpl</code>.</p>
|
||||
<p>Using a <a href="https://kubernetes.io/docs/concepts/storage/volumes/">Volume</a> it is possible to use a custom template.
|
||||
This includes using a <a href="https://kubernetes.io/docs/concepts/storage/volumes/#example-pod-with-a-secret-a-downward-api-and-a-configmap">Configmap</a> as source of the template</p>
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/nginx-configuration/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="nginx-configuration">NGINX Configuration<a class="headerlink" href="#nginx-configuration" title="Permanent link">¶</a></h1>
|
||||
<h1 id="nginx-configuration">NGINX Configuration<a class="headerlink" href="#nginx-configuration" title="Permanent link"> ¶</a></h1>
|
||||
<p>There are three ways to customize NGINX:</p>
|
||||
<ol>
|
||||
<li><a href="configmap/">ConfigMap</a>: using a Configmap to set global configurations in NGINX.</li>
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/nginx-configuration/log-format.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="log-format">Log format<a class="headerlink" href="#log-format" title="Permanent link">¶</a></h1>
|
||||
<h1 id="log-format">Log format<a class="headerlink" href="#log-format" title="Permanent link"> ¶</a></h1>
|
||||
<p>The default configuration uses a custom logging format to add additional information about upstreams, response time and status.</p>
|
||||
<div class="codehilite"><pre><span></span>log_format upstreaminfo
|
||||
'$remote_addr - $remote_user [$time_local] "$request" '
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/third-party-addons/modsecurity.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="modsecurity-web-application-firewall">ModSecurity Web Application Firewall<a class="headerlink" href="#modsecurity-web-application-firewall" title="Permanent link">¶</a></h1>
|
||||
<h1 id="modsecurity-web-application-firewall">ModSecurity Web Application Firewall<a class="headerlink" href="#modsecurity-web-application-firewall" title="Permanent link"> ¶</a></h1>
|
||||
<p>ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis - <a href="https://www.modsecurity.org">https://www.modsecurity.org</a></p>
|
||||
<p>The <a href="https://github.com/SpiderLabs/ModSecurity-nginx">ModSecurity-nginx</a> connector is the connection point between NGINX and libmodsecurity (ModSecurity v3).</p>
|
||||
<p>The default ModSecurity configuration file is located in <code class="codehilite">/etc/nginx/modsecurity/modsecurity.conf</code>. This is the only file located in this directory and contains the default recommended configuration. Using a volume we can replace this file with the desired configuration.
|
||||
|
|
|
|||
|
|
@ -1249,11 +1249,11 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/third-party-addons/opentracing.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="opentracing">OpenTracing<a class="headerlink" href="#opentracing" title="Permanent link">¶</a></h1>
|
||||
<h1 id="opentracing">OpenTracing<a class="headerlink" href="#opentracing" title="Permanent link"> ¶</a></h1>
|
||||
<p>Enables requests served by NGINX for distributed tracing via The OpenTracing Project.</p>
|
||||
<p>Using the third party module <a href="https://github.com/opentracing-contrib/nginx-opentracing">opentracing-contrib/nginx-opentracing</a> the NGINX ingress controller can configure NGINX to enable <a href="http://opentracing.io">OpenTracing</a> instrumentation.
|
||||
By default this feature is disabled.</p>
|
||||
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">¶</a></h2>
|
||||
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link"> ¶</a></h2>
|
||||
<p>To enable the instrumentation we must enable OpenTracing in the configuration ConfigMap:
|
||||
<div class="codehilite"><pre><span></span><span class="n">data</span><span class="o">:</span>
|
||||
<span class="n">enable</span><span class="o">-</span><span class="n">opentracing</span><span class="o">:</span> <span class="s2">"true"</span>
|
||||
|
|
@ -1321,10 +1321,10 @@ datadog-service-name
|
|||
datadog-operation-name-override
|
||||
</pre></div></p>
|
||||
<p>All these options (including host) allow environment variables, such as <code class="codehilite">$HOSTNAME</code> or <code class="codehilite">$HOST_IP</code>. In the case of Jaeger, if you have a Jaeger agent running on each machine in your cluster, you can use something like <code class="codehilite">$HOST_IP</code> (which can be 'mounted' with the <code class="codehilite">status.hostIP</code> fieldpath, as described <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#capabilities-of-the-downward-api">here</a>) to make sure traces will be sent to the local agent.</p>
|
||||
<h2 id="examples">Examples<a class="headerlink" href="#examples" title="Permanent link">¶</a></h2>
|
||||
<h2 id="examples">Examples<a class="headerlink" href="#examples" title="Permanent link"> ¶</a></h2>
|
||||
<p>The following examples show how to deploy and test different distributed tracing systems. These example can be performed
|
||||
using Minikube.</p>
|
||||
<h3 id="zipkin">Zipkin<a class="headerlink" href="#zipkin" title="Permanent link">¶</a></h3>
|
||||
<h3 id="zipkin">Zipkin<a class="headerlink" href="#zipkin" title="Permanent link"> ¶</a></h3>
|
||||
<p>In the <a href="https://github.com/rnburn/zipkin-date-server">rnburn/zipkin-date-server</a>
|
||||
GitHub repository is an example of a dockerized date service. To install the example and Zipkin collector run:</p>
|
||||
<div class="codehilite"><pre><span></span>kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml
|
||||
|
|
@ -1346,7 +1346,7 @@ kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/ma
|
|||
|
||||
<p>In the Zipkin interface we can see the details:
|
||||
<img alt="zipkin screenshot" src="../../../images/zipkin-demo.png" title="zipkin collector screenshot" /></p>
|
||||
<h3 id="jaeger">Jaeger<a class="headerlink" href="#jaeger" title="Permanent link">¶</a></h3>
|
||||
<h3 id="jaeger">Jaeger<a class="headerlink" href="#jaeger" title="Permanent link"> ¶</a></h3>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Enable Ingress addon in Minikube:
|
||||
|
|
|
|||
|
|
@ -1303,8 +1303,8 @@
|
|||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/user-guide/tls.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1 id="tlshttps">TLS/HTTPS<a class="headerlink" href="#tlshttps" title="Permanent link">¶</a></h1>
|
||||
<h2 id="tls-secrets">TLS Secrets<a class="headerlink" href="#tls-secrets" title="Permanent link">¶</a></h2>
|
||||
<h1 id="tlshttps">TLS/HTTPS<a class="headerlink" href="#tlshttps" title="Permanent link"> ¶</a></h1>
|
||||
<h2 id="tls-secrets">TLS Secrets<a class="headerlink" href="#tls-secrets" title="Permanent link"> ¶</a></h2>
|
||||
<p>Anytime we reference a TLS secret, we mean a PEM-encoded X.509, RSA (2048) secret.</p>
|
||||
<p>You can generate a self-signed certificate and private key with:</p>
|
||||
<div class="codehilite"><pre><span></span>$ openssl req -x509 -nodes -days <span class="m">365</span> -newkey rsa:2048 -keyout <span class="si">${</span><span class="nv">KEY_FILE</span><span class="si">}</span> -out <span class="si">${</span><span class="nv">CERT_FILE</span><span class="si">}</span> -subj <span class="s2">"/CN=</span><span class="si">${</span><span class="nv">HOST</span><span class="si">}</span><span class="s2">/O=</span><span class="si">${</span><span class="nv">HOST</span><span class="si">}</span><span class="s2">"</span>
|
||||
|
|
@ -1315,7 +1315,7 @@
|
|||
</pre></div>
|
||||
|
||||
<p>The resulting secret will be of type <code class="codehilite">kubernetes.io/tls</code>.</p>
|
||||
<h2 id="default-ssl-certificate">Default SSL Certificate<a class="headerlink" href="#default-ssl-certificate" title="Permanent link">¶</a></h2>
|
||||
<h2 id="default-ssl-certificate">Default SSL Certificate<a class="headerlink" href="#default-ssl-certificate" title="Permanent link"> ¶</a></h2>
|
||||
<p>NGINX provides the option to configure a server as a catch-all with
|
||||
<a href="http://nginx.org/en/docs/http/server_names.html">server_name</a>
|
||||
for requests that do not match any of the configured server names.
|
||||
|
|
@ -1329,8 +1329,8 @@ If this flag is not provided NGINX will use a self-signed certificate.</p>
|
|||
add <code class="codehilite">--default-ssl-certificate=default/foo-tls</code> in the <code class="codehilite">nginx-controller</code> deployment.</p>
|
||||
<p>The default certificate will also be used for ingress <code class="codehilite">tls:</code> sections that do not
|
||||
have a <code class="codehilite">secretName</code> option.</p>
|
||||
<h2 id="ssl-passthrough">SSL Passthrough<a class="headerlink" href="#ssl-passthrough" title="Permanent link">¶</a></h2>
|
||||
<p>The <a href="cli-arguments/"><code class="codehilite">--enable-ssl-passthrough</code></a> flag enables the SSL Passthrough feature, which is disabled by
|
||||
<h2 id="ssl-passthrough">SSL Passthrough<a class="headerlink" href="#ssl-passthrough" title="Permanent link"> ¶</a></h2>
|
||||
<p>The <a href="../cli-arguments/"><code class="codehilite">--enable-ssl-passthrough</code></a> flag enables the SSL Passthrough feature, which is disabled by
|
||||
default. This is required to enable passthrough backends in Ingress objects.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
|
|
@ -1347,14 +1347,14 @@ passthrough proxy port (default: 442), which proxies the request to the default
|
|||
<p>Unlike HTTP backends, traffic to Passthrough backends is sent to the <em>clusterIP</em> of the backing Service instead of
|
||||
individual Endpoints.</p>
|
||||
</div>
|
||||
<h2 id="http-strict-transport-security">HTTP Strict Transport Security<a class="headerlink" href="#http-strict-transport-security" title="Permanent link">¶</a></h2>
|
||||
<h2 id="http-strict-transport-security">HTTP Strict Transport Security<a class="headerlink" href="#http-strict-transport-security" title="Permanent link"> ¶</a></h2>
|
||||
<p>HTTP Strict Transport Security (HSTS) is an opt-in security enhancement specified
|
||||
through the use of a special response header. Once a supported browser receives
|
||||
this header that browser will prevent any communications from being sent over
|
||||
HTTP to the specified domain and will instead send all communications over HTTPS.</p>
|
||||
<p>HSTS is enabled by default.</p>
|
||||
<p>To disable this behavior use <code class="codehilite">hsts: "false"</code> in the configuration <a href="../nginx-configuration/configmap/">ConfigMap</a>.</p>
|
||||
<h2 id="server-side-https-enforcement-through-redirect">Server-side HTTPS enforcement through redirect<a class="headerlink" href="#server-side-https-enforcement-through-redirect" title="Permanent link">¶</a></h2>
|
||||
<h2 id="server-side-https-enforcement-through-redirect">Server-side HTTPS enforcement through redirect<a class="headerlink" href="#server-side-https-enforcement-through-redirect" title="Permanent link"> ¶</a></h2>
|
||||
<p>By default the controller redirects HTTP clients to the HTTPS port
|
||||
443 using a 308 Permanent Redirect response if TLS is enabled for that Ingress.</p>
|
||||
<p>This can be disabled globally using <code class="codehilite">ssl-redirect: "false"</code> in the NGINX <a href="../nginx-configuration/configmap/">config map</a>,
|
||||
|
|
@ -1367,7 +1367,7 @@ redirect to HTTPS even when there is no TLS certificate available.
|
|||
This can be achieved by using the <code class="codehilite">nginx.ingress.kubernetes.io/force-ssl-redirect: "true"</code>
|
||||
annotation in the particular resource.</p>
|
||||
</div>
|
||||
<h2 id="automated-certificate-management-with-kube-lego">Automated Certificate Management with Kube-Lego<a class="headerlink" href="#automated-certificate-management-with-kube-lego" title="Permanent link">¶</a></h2>
|
||||
<h2 id="automated-certificate-management-with-kube-lego">Automated Certificate Management with Kube-Lego<a class="headerlink" href="#automated-certificate-management-with-kube-lego" title="Permanent link"> ¶</a></h2>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
<p>Kube-Lego has reached end-of-life and is being
|
||||
|
|
@ -1381,10 +1381,10 @@ by monitoring ingress resources and their referenced secrets.</p>
|
|||
|
||||
<p>To setup Kube-Lego you can take a look at this <a href="https://github.com/jetstack/kube-lego/tree/master/examples">full example</a>.
|
||||
The first version to fully support Kube-Lego is Nginx Ingress controller 0.8.</p>
|
||||
<h2 id="default-tls-version-and-ciphers">Default TLS Version and Ciphers<a class="headerlink" href="#default-tls-version-and-ciphers" title="Permanent link">¶</a></h2>
|
||||
<h2 id="default-tls-version-and-ciphers">Default TLS Version and Ciphers<a class="headerlink" href="#default-tls-version-and-ciphers" title="Permanent link"> ¶</a></h2>
|
||||
<p>To provide the most secure baseline configuration possible,</p>
|
||||
<p>nginx-ingress defaults to using TLS 1.2 only and a <a href="../nginx-configuration/configmap/#ssl-ciphers">secure set of TLS ciphers</a>.</p>
|
||||
<h3 id="legacy-tls">Legacy TLS<a class="headerlink" href="#legacy-tls" title="Permanent link">¶</a></h3>
|
||||
<h3 id="legacy-tls">Legacy TLS<a class="headerlink" href="#legacy-tls" title="Permanent link"> ¶</a></h3>
|
||||
<p>The default configuration, though secure, does not support some older browsers and operating systems.</p>
|
||||
<p>For instance, TLS 1.1+ is only enabled by default from Android 5.0 on. At the time of writing,
|
||||
May 2018, <a href="https://developer.android.com/about/dashboards/#Platform">approximately 15% of Android devices</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue