Deploy GitHub Pages
This commit is contained in:
parent
bc6e898a19
commit
cf75938808
56 changed files with 483 additions and 475 deletions
|
@ -1249,7 +1249,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/baremetal.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/baremetal.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="bare-metal-considerations">Bare-metal considerations<a class="headerlink" href="#bare-metal-considerations" title="Permanent link">¶</a></h1>
|
<h1 id="bare-metal-considerations">Bare-metal considerations<a class="headerlink" href="#bare-metal-considerations" title="Permanent link"> ¶</a></h1>
|
||||||
<p>In traditional <em>cloud</em> environments, where network load balancers are available on-demand, a single Kubernetes manifest
|
<p>In traditional <em>cloud</em> environments, where network load balancers are available on-demand, a single Kubernetes manifest
|
||||||
suffices to provide a single point of contact to the NGINX Ingress controller to external clients and, indirectly, to
|
suffices to provide a single point of contact to the NGINX Ingress controller to external clients and, indirectly, to
|
||||||
any application running inside the cluster. <em>Bare-metal</em> environments lack this commodity, requiring a slightly
|
any application running inside the cluster. <em>Bare-metal</em> environments lack this commodity, requiring a slightly
|
||||||
|
@ -1258,7 +1258,7 @@ different setup to offer the same kind of access to external consumers.</p>
|
||||||
<img alt="Bare-metal environment" src="../../images/baremetal/baremetal_overview.jpg" /></p>
|
<img alt="Bare-metal environment" src="../../images/baremetal/baremetal_overview.jpg" /></p>
|
||||||
<p>The rest of this document describes a few recommended approaches to deploying the NGINX Ingress controller inside a
|
<p>The rest of this document describes a few recommended approaches to deploying the NGINX Ingress controller inside a
|
||||||
Kubernetes cluster running on bare-metal.</p>
|
Kubernetes cluster running on bare-metal.</p>
|
||||||
<h2 id="a-pure-software-solution-metallb">A pure software solution: MetalLB<a class="headerlink" href="#a-pure-software-solution-metallb" title="Permanent link">¶</a></h2>
|
<h2 id="a-pure-software-solution-metallb">A pure software solution: MetalLB<a class="headerlink" href="#a-pure-software-solution-metallb" title="Permanent link"> ¶</a></h2>
|
||||||
<p><a href="https://metallb.universe.tf/">MetalLB</a> provides a network load-balancer implementation for Kubernetes clusters that do not run on a
|
<p><a href="https://metallb.universe.tf/">MetalLB</a> provides a network load-balancer implementation for Kubernetes clusters that do not run on a
|
||||||
supported cloud provider, effectively allowing the usage of LoadBalancer Services within any cluster.</p>
|
supported cloud provider, effectively allowing the usage of LoadBalancer Services within any cluster.</p>
|
||||||
<p>This section demonstrates how to use the <a href="https://metallb.universe.tf/tutorial/layer2/">Layer 2 configuration mode</a> of MetalLB together with the NGINX
|
<p>This section demonstrates how to use the <a href="https://metallb.universe.tf/tutorial/layer2/">Layer 2 configuration mode</a> of MetalLB together with the NGINX
|
||||||
|
@ -1328,7 +1328,7 @@ the ports configured in the LoadBalancer Service:</p>
|
||||||
traffic policy. Traffic policies are described in more details in <a href="https://metallb.universe.tf/usage/#traffic-policies">Traffic policies</a> as
|
traffic policy. Traffic policies are described in more details in <a href="https://metallb.universe.tf/usage/#traffic-policies">Traffic policies</a> as
|
||||||
well as in the next section.</p>
|
well as in the next section.</p>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="over-a-nodeport-service">Over a NodePort Service<a class="headerlink" href="#over-a-nodeport-service" title="Permanent link">¶</a></h2>
|
<h2 id="over-a-nodeport-service">Over a NodePort Service<a class="headerlink" href="#over-a-nodeport-service" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Due to its simplicity, this is the setup a user will deploy by default when following the steps described in the
|
<p>Due to its simplicity, this is the setup a user will deploy by default when following the steps described in the
|
||||||
<a href="../#bare-metal">installation guide</a>.</p>
|
<a href="../#bare-metal">installation guide</a>.</p>
|
||||||
<div class="admonition info">
|
<div class="admonition info">
|
||||||
|
@ -1469,7 +1469,7 @@ NodePort:</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h2 id="via-the-host-network">Via the host network<a class="headerlink" href="#via-the-host-network" title="Permanent link">¶</a></h2>
|
<h2 id="via-the-host-network">Via the host network<a class="headerlink" href="#via-the-host-network" title="Permanent link"> ¶</a></h2>
|
||||||
<p>In a setup where there is no external load balancer available but using NodePorts is not an option, one can configure
|
<p>In a setup where there is no external load balancer available but using NodePorts is not an option, one can configure
|
||||||
<code class="codehilite">ingress-nginx</code> Pods to use the network of the host they run on instead of a dedicated network namespace. The benefit of
|
<code class="codehilite">ingress-nginx</code> Pods to use the network of the host they run on instead of a dedicated network namespace. The benefit of
|
||||||
this approach is that the NGINX Ingress controller can bind ports 80 and 443 directly to Kubernetes nodes' network
|
this approach is that the NGINX Ingress controller can bind ports 80 and 443 directly to Kubernetes nodes' network
|
||||||
|
@ -1566,7 +1566,7 @@ address of all nodes running the NGINX Ingress controller.</p>
|
||||||
<p>Alternatively, it is possible to override the address written to Ingress objects using the
|
<p>Alternatively, it is possible to override the address written to Ingress objects using the
|
||||||
<code class="codehilite">--publish-status-address</code> flag. See <a href="../../user-guide/cli-arguments/">Command line arguments</a>.</p>
|
<code class="codehilite">--publish-status-address</code> flag. See <a href="../../user-guide/cli-arguments/">Command line arguments</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="using-a-self-provisioned-edge">Using a self-provisioned edge<a class="headerlink" href="#using-a-self-provisioned-edge" title="Permanent link">¶</a></h2>
|
<h2 id="using-a-self-provisioned-edge">Using a self-provisioned edge<a class="headerlink" href="#using-a-self-provisioned-edge" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Similarly to cloud environments, this deployment approach requires an edge network component providing a public
|
<p>Similarly to cloud environments, this deployment approach requires an edge network component providing a public
|
||||||
entrypoint to the Kubernetes cluster. This edge component can be either hardware (e.g. vendor appliance) or software
|
entrypoint to the Kubernetes cluster. This edge component can be either hardware (e.g. vendor appliance) or software
|
||||||
(e.g. <em>HAproxy</em>) and is usually managed outside of the Kubernetes landscape by operations teams.</p>
|
(e.g. <em>HAproxy</em>) and is usually managed outside of the Kubernetes landscape by operations teams.</p>
|
||||||
|
@ -1577,7 +1577,7 @@ This is particularly suitable for private Kubernetes clusters where none of the
|
||||||
nodes and/or masters. Incoming traffic on TCP ports 80 and 443 is forwarded to the corresponding HTTP and HTTPS NodePort
|
nodes and/or masters. Incoming traffic on TCP ports 80 and 443 is forwarded to the corresponding HTTP and HTTPS NodePort
|
||||||
on the target nodes as shown in the diagram below:</p>
|
on the target nodes as shown in the diagram below:</p>
|
||||||
<p><img alt="User edge" src="../../images/baremetal/user_edge.jpg" /></p>
|
<p><img alt="User edge" src="../../images/baremetal/user_edge.jpg" /></p>
|
||||||
<h2 id="external-ips">External IPs<a class="headerlink" href="#external-ips" title="Permanent link">¶</a></h2>
|
<h2 id="external-ips">External IPs<a class="headerlink" href="#external-ips" title="Permanent link"> ¶</a></h2>
|
||||||
<div class="admonition danger">
|
<div class="admonition danger">
|
||||||
<p class="admonition-title">Source IP address</p>
|
<p class="admonition-title">Source IP address</p>
|
||||||
<p>This method does not allow preserving the source IP of HTTP requests in any manner, it is therefore <strong>not
|
<p>This method does not allow preserving the source IP of HTTP requests in any manner, it is therefore <strong>not
|
||||||
|
|
|
@ -1425,8 +1425,8 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="installation-guide">Installation Guide<a class="headerlink" href="#installation-guide" title="Permanent link">¶</a></h1>
|
<h1 id="installation-guide">Installation Guide<a class="headerlink" href="#installation-guide" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="contents">Contents<a class="headerlink" href="#contents" title="Permanent link">¶</a></h2>
|
<h2 id="contents">Contents<a class="headerlink" href="#contents" title="Permanent link"> ¶</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#prerequisite-generic-deployment-command">Prerequisite Generic Deployment Command</a></li>
|
<li><a href="#prerequisite-generic-deployment-command">Prerequisite Generic Deployment Command</a></li>
|
||||||
<li><a href="#provider-specific-steps">Provider Specific Steps</a><ul>
|
<li><a href="#provider-specific-steps">Provider Specific Steps</a><ul>
|
||||||
|
@ -1442,7 +1442,7 @@
|
||||||
<li><a href="#detect-installed-version">Detect installed version</a></li>
|
<li><a href="#detect-installed-version">Detect installed version</a></li>
|
||||||
<li><a href="#using-helm">Using Helm</a></li>
|
<li><a href="#using-helm">Using Helm</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="prerequisite-generic-deployment-command">Prerequisite Generic Deployment Command<a class="headerlink" href="#prerequisite-generic-deployment-command" title="Permanent link">¶</a></h2>
|
<h2 id="prerequisite-generic-deployment-command">Prerequisite Generic Deployment Command<a class="headerlink" href="#prerequisite-generic-deployment-command" title="Permanent link"> ¶</a></h2>
|
||||||
<div class="admonition attention">
|
<div class="admonition attention">
|
||||||
<p class="admonition-title">Attention</p>
|
<p class="admonition-title">Attention</p>
|
||||||
<p>The default configuration watches Ingress object from <em>all the namespaces</em>.
|
<p>The default configuration watches Ingress object from <em>all the namespaces</em>.
|
||||||
|
@ -1468,15 +1468,15 @@ To change this behavior use the flag <code class="codehilite">--watch-namespace<
|
||||||
<p class="admonition-title">Tip</p>
|
<p class="admonition-title">Tip</p>
|
||||||
<p>If you are using a Kubernetes version previous to 1.14, you need to change <code class="codehilite">kubernetes.io/os</code> to <code class="codehilite">beta.kubernetes.io/os</code> at line 217 of <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/static/mandatory.yaml#L217">mandatory.yaml</a>, see <a href="https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/">Labels details</a>.</p>
|
<p>If you are using a Kubernetes version previous to 1.14, you need to change <code class="codehilite">kubernetes.io/os</code> to <code class="codehilite">beta.kubernetes.io/os</code> at line 217 of <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/static/mandatory.yaml#L217">mandatory.yaml</a>, see <a href="https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/">Labels details</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<h3 id="provider-specific-steps">Provider Specific Steps<a class="headerlink" href="#provider-specific-steps" title="Permanent link">¶</a></h3>
|
<h3 id="provider-specific-steps">Provider Specific Steps<a class="headerlink" href="#provider-specific-steps" title="Permanent link"> ¶</a></h3>
|
||||||
<p>There are cloud provider specific yaml files.</p>
|
<p>There are cloud provider specific yaml files.</p>
|
||||||
<h4 id="docker-for-mac">Docker for Mac<a class="headerlink" href="#docker-for-mac" title="Permanent link">¶</a></h4>
|
<h4 id="docker-for-mac">Docker for Mac<a class="headerlink" href="#docker-for-mac" title="Permanent link"> ¶</a></h4>
|
||||||
<p>Kubernetes is available in Docker for Mac (from <a href="https://docs.docker.com/docker-for-mac/release-notes/#stable-releases-of-2018">version 18.06.0-ce</a>)</p>
|
<p>Kubernetes is available in Docker for Mac (from <a href="https://docs.docker.com/docker-for-mac/release-notes/#stable-releases-of-2018">version 18.06.0-ce</a>)</p>
|
||||||
<p>Create a service</p>
|
<p>Create a service</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h4 id="minikube">minikube<a class="headerlink" href="#minikube" title="Permanent link">¶</a></h4>
|
<h4 id="minikube">minikube<a class="headerlink" href="#minikube" title="Permanent link"> ¶</a></h4>
|
||||||
<p>For standard usage:</p>
|
<p>For standard usage:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">minikube addons enable ingress</span>
|
<div class="codehilite"><pre><span></span><span class="go">minikube addons enable ingress</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1498,11 +1498,11 @@ To change this behavior use the flag <code class="codehilite">--watch-namespace<
|
||||||
<span class="go">nginx-ingress-controller-fdcdcd6dd-vvpgs 1/1 Running 0 11s</span>
|
<span class="go">nginx-ingress-controller-fdcdcd6dd-vvpgs 1/1 Running 0 11s</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h4 id="aws">AWS<a class="headerlink" href="#aws" title="Permanent link">¶</a></h4>
|
<h4 id="aws">AWS<a class="headerlink" href="#aws" title="Permanent link"> ¶</a></h4>
|
||||||
<p>In AWS we use an Elastic Load Balancer (ELB) to expose the NGINX Ingress controller behind a Service of <code class="codehilite">Type=LoadBalancer</code>.
|
<p>In AWS we use an Elastic Load Balancer (ELB) to expose the NGINX Ingress controller behind a Service of <code class="codehilite">Type=LoadBalancer</code>.
|
||||||
Since Kubernetes v1.9.0 it is possible to use a classic load balancer (ELB) or network load balancer (NLB)
|
Since Kubernetes v1.9.0 it is possible to use a classic load balancer (ELB) or network load balancer (NLB)
|
||||||
Please check the <a href="https://aws.amazon.com/elasticloadbalancing/details/">elastic load balancing AWS details page</a></p>
|
Please check the <a href="https://aws.amazon.com/elasticloadbalancing/details/">elastic load balancing AWS details page</a></p>
|
||||||
<h5 id="elastic-load-balancer-elb">Elastic Load Balancer - ELB<a class="headerlink" href="#elastic-load-balancer-elb" title="Permanent link">¶</a></h5>
|
<h5 id="elastic-load-balancer-elb">Elastic Load Balancer - ELB<a class="headerlink" href="#elastic-load-balancer-elb" title="Permanent link"> ¶</a></h5>
|
||||||
<p>This setup requires to choose in which layer (L4 or L7) we want to configure the ELB:</p>
|
<p>This setup requires to choose in which layer (L4 or L7) we want to configure the ELB:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://en.wikipedia.org/wiki/OSI_model#Layer_4:_Transport_Layer">Layer 4</a>: use TCP as the listener protocol for ports 80 and 443.</li>
|
<li><a href="https://en.wikipedia.org/wiki/OSI_model#Layer_4:_Transport_Layer">Layer 4</a>: use TCP as the listener protocol for ports 80 and 443.</li>
|
||||||
|
@ -1525,26 +1525,26 @@ Please check the <a href="https://aws.amazon.com/elasticloadbalancing/details/">
|
||||||
|
|
||||||
<p>This example creates an ELB with just two listeners, one in port 80 and another in port 443</p>
|
<p>This example creates an ELB with just two listeners, one in port 80 and another in port 443</p>
|
||||||
<p><img alt="Listeners" src="../images/elb-l7-listener.png" /></p>
|
<p><img alt="Listeners" src="../images/elb-l7-listener.png" /></p>
|
||||||
<h5 id="elb-idle-timeouts">ELB Idle Timeouts<a class="headerlink" href="#elb-idle-timeouts" title="Permanent link">¶</a></h5>
|
<h5 id="elb-idle-timeouts">ELB Idle Timeouts<a class="headerlink" href="#elb-idle-timeouts" title="Permanent link"> ¶</a></h5>
|
||||||
<p>In some scenarios users will need to modify the value of the ELB idle timeout. Users need to ensure the idle timeout is less than the <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout">keepalive_timeout</a> that is configured for NGINX. By default NGINX <code class="codehilite">keepalive_timeout</code> is set to <code class="codehilite">75s</code>.</p>
|
<p>In some scenarios users will need to modify the value of the ELB idle timeout. Users need to ensure the idle timeout is less than the <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout">keepalive_timeout</a> that is configured for NGINX. By default NGINX <code class="codehilite">keepalive_timeout</code> is set to <code class="codehilite">75s</code>.</p>
|
||||||
<p>The default ELB idle timeout will work for most scenarios, unless the NGINX <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout">keepalive_timeout</a> has been modified, in which case <code class="codehilite">service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout</code> will need to be modified to ensure it is less than the <code class="codehilite">keepalive_timeout</code> the user has configured.</p>
|
<p>The default ELB idle timeout will work for most scenarios, unless the NGINX <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout">keepalive_timeout</a> has been modified, in which case <code class="codehilite">service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout</code> will need to be modified to ensure it is less than the <code class="codehilite">keepalive_timeout</code> the user has configured.</p>
|
||||||
<p><em>Please Note: An idle timeout of <code class="codehilite">3600s</code> is recommended when using WebSockets.</em></p>
|
<p><em>Please Note: An idle timeout of <code class="codehilite">3600s</code> is recommended when using WebSockets.</em></p>
|
||||||
<p>More information with regards to idle timeouts for your Load Balancer can be found in the <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html">official AWS documentation</a>.</p>
|
<p>More information with regards to idle timeouts for your Load Balancer can be found in the <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html">official AWS documentation</a>.</p>
|
||||||
<h5 id="network-load-balancer-nlb">Network Load Balancer (NLB)<a class="headerlink" href="#network-load-balancer-nlb" title="Permanent link">¶</a></h5>
|
<h5 id="network-load-balancer-nlb">Network Load Balancer (NLB)<a class="headerlink" href="#network-load-balancer-nlb" title="Permanent link"> ¶</a></h5>
|
||||||
<p>This type of load balancer is supported since v1.10.0 as an ALPHA feature.</p>
|
<p>This type of load balancer is supported since v1.10.0 as an ALPHA feature.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/aws/service-nlb.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/aws/service-nlb.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h4 id="gce-gke">GCE-GKE<a class="headerlink" href="#gce-gke" title="Permanent link">¶</a></h4>
|
<h4 id="gce-gke">GCE-GKE<a class="headerlink" href="#gce-gke" title="Permanent link"> ¶</a></h4>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p><strong>Important Note:</strong> proxy protocol is not supported in GCE/GKE</p>
|
<p><strong>Important Note:</strong> proxy protocol is not supported in GCE/GKE</p>
|
||||||
<h4 id="azure">Azure<a class="headerlink" href="#azure" title="Permanent link">¶</a></h4>
|
<h4 id="azure">Azure<a class="headerlink" href="#azure" title="Permanent link"> ¶</a></h4>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h4 id="bare-metal">Bare-metal<a class="headerlink" href="#bare-metal" title="Permanent link">¶</a></h4>
|
<h4 id="bare-metal">Bare-metal<a class="headerlink" href="#bare-metal" title="Permanent link"> ¶</a></h4>
|
||||||
<p>Using <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">NodePort</a>:</p>
|
<p>Using <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">NodePort</a>:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/service-nodeport.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/service-nodeport.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1553,14 +1553,14 @@ Please check the <a href="https://aws.amazon.com/elasticloadbalancing/details/">
|
||||||
<p class="admonition-title">Tip</p>
|
<p class="admonition-title">Tip</p>
|
||||||
<p>For extended notes regarding deployments on bare-metal, see <a href="baremetal/">Bare-metal considerations</a>.</p>
|
<p>For extended notes regarding deployments on bare-metal, see <a href="baremetal/">Bare-metal considerations</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<h3 id="verify-installation">Verify installation<a class="headerlink" href="#verify-installation" title="Permanent link">¶</a></h3>
|
<h3 id="verify-installation">Verify installation<a class="headerlink" href="#verify-installation" title="Permanent link"> ¶</a></h3>
|
||||||
<p>To check if the ingress controller pods have started, run the following command:</p>
|
<p>To check if the ingress controller pods have started, run the following command:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Once the operator pods are running, you can cancel the above command by typing <code class="codehilite">Ctrl+C</code>.
|
<p>Once the operator pods are running, you can cancel the above command by typing <code class="codehilite">Ctrl+C</code>.
|
||||||
Now, you are ready to create your first ingress.</p>
|
Now, you are ready to create your first ingress.</p>
|
||||||
<h3 id="detect-installed-version">Detect installed version<a class="headerlink" href="#detect-installed-version" title="Permanent link">¶</a></h3>
|
<h3 id="detect-installed-version">Detect installed version<a class="headerlink" href="#detect-installed-version" title="Permanent link"> ¶</a></h3>
|
||||||
<p>To detect which version of the ingress controller is running, exec into the pod and run <code class="codehilite">nginx-ingress-controller version</code> command.</p>
|
<p>To detect which version of the ingress controller is running, exec into the pod and run <code class="codehilite">nginx-ingress-controller version</code> command.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">POD_NAMESPACE=ingress-nginx</span>
|
<div class="codehilite"><pre><span></span><span class="go">POD_NAMESPACE=ingress-nginx</span>
|
||||||
<span class="go">POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx -o jsonpath='{.items[0].metadata.name}')</span>
|
<span class="go">POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx -o jsonpath='{.items[0].metadata.name}')</span>
|
||||||
|
@ -1568,7 +1568,7 @@ Now, you are ready to create your first ingress.</p>
|
||||||
<span class="go">kubectl exec -it $POD_NAME -n $POD_NAMESPACE -- /nginx-ingress-controller --version</span>
|
<span class="go">kubectl exec -it $POD_NAME -n $POD_NAMESPACE -- /nginx-ingress-controller --version</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="using-helm">Using Helm<a class="headerlink" href="#using-helm" title="Permanent link">¶</a></h2>
|
<h2 id="using-helm">Using Helm<a class="headerlink" href="#using-helm" title="Permanent link"> ¶</a></h2>
|
||||||
<p>NGINX Ingress controller can be installed via <a href="https://helm.sh/">Helm</a> using the chart <a href="https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress">stable/nginx-ingress</a> from the official charts repository.
|
<p>NGINX Ingress controller can be installed via <a href="https://helm.sh/">Helm</a> using the chart <a href="https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress">stable/nginx-ingress</a> from the official charts repository.
|
||||||
To install the chart with the release name <code class="codehilite">my-nginx</code>:</p>
|
To install the chart with the release name <code class="codehilite">my-nginx</code>:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">helm install stable/nginx-ingress --name my-nginx</span>
|
<div class="codehilite"><pre><span></span><span class="go">helm install stable/nginx-ingress --name my-nginx</span>
|
||||||
|
|
|
@ -1275,8 +1275,8 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/rbac.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/rbac.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="role-based-access-control-rbac">Role Based Access Control (RBAC)<a class="headerlink" href="#role-based-access-control-rbac" title="Permanent link">¶</a></h1>
|
<h1 id="role-based-access-control-rbac">Role Based Access Control (RBAC)<a class="headerlink" href="#role-based-access-control-rbac" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">¶</a></h2>
|
<h2 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link"> ¶</a></h2>
|
||||||
<p>This example applies to nginx-ingress-controllers being deployed in an environment with RBAC enabled.</p>
|
<p>This example applies to nginx-ingress-controllers being deployed in an environment with RBAC enabled.</p>
|
||||||
<p>Role Based Access Control is comprised of four layers:</p>
|
<p>Role Based Access Control is comprised of four layers:</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1288,13 +1288,13 @@
|
||||||
<p>In order for RBAC to be applied to an nginx-ingress-controller, that controller
|
<p>In order for RBAC to be applied to an nginx-ingress-controller, that controller
|
||||||
should be assigned to a <code class="codehilite">ServiceAccount</code>. That <code class="codehilite">ServiceAccount</code> should be
|
should be assigned to a <code class="codehilite">ServiceAccount</code>. That <code class="codehilite">ServiceAccount</code> should be
|
||||||
bound to the <code class="codehilite">Role</code>s and <code class="codehilite">ClusterRole</code>s defined for the nginx-ingress-controller.</p>
|
bound to the <code class="codehilite">Role</code>s and <code class="codehilite">ClusterRole</code>s defined for the nginx-ingress-controller.</p>
|
||||||
<h2 id="service-accounts-created-in-this-example">Service Accounts created in this example<a class="headerlink" href="#service-accounts-created-in-this-example" title="Permanent link">¶</a></h2>
|
<h2 id="service-accounts-created-in-this-example">Service Accounts created in this example<a class="headerlink" href="#service-accounts-created-in-this-example" title="Permanent link"> ¶</a></h2>
|
||||||
<p>One ServiceAccount is created in this example, <code class="codehilite">nginx-ingress-serviceaccount</code>.</p>
|
<p>One ServiceAccount is created in this example, <code class="codehilite">nginx-ingress-serviceaccount</code>.</p>
|
||||||
<h2 id="permissions-granted-in-this-example">Permissions Granted in this example<a class="headerlink" href="#permissions-granted-in-this-example" title="Permanent link">¶</a></h2>
|
<h2 id="permissions-granted-in-this-example">Permissions Granted in this example<a class="headerlink" href="#permissions-granted-in-this-example" title="Permanent link"> ¶</a></h2>
|
||||||
<p>There are two sets of permissions defined in this example. Cluster-wide
|
<p>There are two sets of permissions defined in this example. Cluster-wide
|
||||||
permissions defined by the <code class="codehilite">ClusterRole</code> named <code class="codehilite">nginx-ingress-clusterrole</code>, and
|
permissions defined by the <code class="codehilite">ClusterRole</code> named <code class="codehilite">nginx-ingress-clusterrole</code>, and
|
||||||
namespace specific permissions defined by the <code class="codehilite">Role</code> named <code class="codehilite">nginx-ingress-role</code>.</p>
|
namespace specific permissions defined by the <code class="codehilite">Role</code> named <code class="codehilite">nginx-ingress-role</code>.</p>
|
||||||
<h3 id="cluster-permissions">Cluster Permissions<a class="headerlink" href="#cluster-permissions" title="Permanent link">¶</a></h3>
|
<h3 id="cluster-permissions">Cluster Permissions<a class="headerlink" href="#cluster-permissions" title="Permanent link"> ¶</a></h3>
|
||||||
<p>These permissions are granted in order for the nginx-ingress-controller to be
|
<p>These permissions are granted in order for the nginx-ingress-controller to be
|
||||||
able to function as an ingress across the cluster. These permissions are
|
able to function as an ingress across the cluster. These permissions are
|
||||||
granted to the ClusterRole named <code class="codehilite">nginx-ingress-clusterrole</code></p>
|
granted to the ClusterRole named <code class="codehilite">nginx-ingress-clusterrole</code></p>
|
||||||
|
@ -1305,7 +1305,7 @@ granted to the ClusterRole named <code class="codehilite">nginx-ingress-clusterr
|
||||||
<li><code class="codehilite">events</code>: create, patch</li>
|
<li><code class="codehilite">events</code>: create, patch</li>
|
||||||
<li><code class="codehilite">ingresses/status</code>: update</li>
|
<li><code class="codehilite">ingresses/status</code>: update</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="namespace-permissions">Namespace Permissions<a class="headerlink" href="#namespace-permissions" title="Permanent link">¶</a></h3>
|
<h3 id="namespace-permissions">Namespace Permissions<a class="headerlink" href="#namespace-permissions" title="Permanent link"> ¶</a></h3>
|
||||||
<p>These permissions are granted specific to the nginx-ingress namespace. These
|
<p>These permissions are granted specific to the nginx-ingress namespace. These
|
||||||
permissions are granted to the Role named <code class="codehilite">nginx-ingress-role</code></p>
|
permissions are granted to the Role named <code class="codehilite">nginx-ingress-role</code></p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1333,7 +1333,7 @@ are part of the request body).</p>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Please adapt accordingly if you overwrite either parameter when launching the
|
<p>Please adapt accordingly if you overwrite either parameter when launching the
|
||||||
nginx-ingress-controller.</p>
|
nginx-ingress-controller.</p>
|
||||||
<h3 id="bindings">Bindings<a class="headerlink" href="#bindings" title="Permanent link">¶</a></h3>
|
<h3 id="bindings">Bindings<a class="headerlink" href="#bindings" title="Permanent link"> ¶</a></h3>
|
||||||
<p>The ServiceAccount <code class="codehilite">nginx-ingress-serviceaccount</code> is bound to the Role
|
<p>The ServiceAccount <code class="codehilite">nginx-ingress-serviceaccount</code> is bound to the Role
|
||||||
<code class="codehilite">nginx-ingress-role</code> and the ClusterRole <code class="codehilite">nginx-ingress-clusterrole</code>.</p>
|
<code class="codehilite">nginx-ingress-role</code> and the ClusterRole <code class="codehilite">nginx-ingress-clusterrole</code>.</p>
|
||||||
<p>The serviceAccountName associated with the containers in the deployment must
|
<p>The serviceAccountName associated with the containers in the deployment must
|
||||||
|
|
|
@ -1207,13 +1207,13 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/upgrade.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/upgrade.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="upgrading">Upgrading<a class="headerlink" href="#upgrading" title="Permanent link">¶</a></h1>
|
<h1 id="upgrading">Upgrading<a class="headerlink" href="#upgrading" title="Permanent link"> ¶</a></h1>
|
||||||
<div class="admonition important">
|
<div class="admonition important">
|
||||||
<p class="admonition-title">Important</p>
|
<p class="admonition-title">Important</p>
|
||||||
<p>No matter the method you use for upgrading, <em>if you use template overrides,
|
<p>No matter the method you use for upgrading, <em>if you use template overrides,
|
||||||
make sure your templates are compatible with the new version of ingress-nginx</em>.</p>
|
make sure your templates are compatible with the new version of ingress-nginx</em>.</p>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="without-helm">Without Helm<a class="headerlink" href="#without-helm" title="Permanent link">¶</a></h2>
|
<h2 id="without-helm">Without Helm<a class="headerlink" href="#without-helm" title="Permanent link"> ¶</a></h2>
|
||||||
<p>To upgrade your ingress-nginx installation, it should be enough to change the version of the image
|
<p>To upgrade your ingress-nginx installation, it should be enough to change the version of the image
|
||||||
in the controller Deployment.</p>
|
in the controller Deployment.</p>
|
||||||
<p>I.e. if your deployment resource looks like (partial example):</p>
|
<p>I.e. if your deployment resource looks like (partial example):</p>
|
||||||
|
@ -1240,7 +1240,7 @@ The easiest way to do this is e.g. (do note you may need to change the name para
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>For interactive editing, use <code class="codehilite">kubectl edit deployment nginx-ingress-controller</code>.</p>
|
<p>For interactive editing, use <code class="codehilite">kubectl edit deployment nginx-ingress-controller</code>.</p>
|
||||||
<h2 id="with-helm">With Helm<a class="headerlink" href="#with-helm" title="Permanent link">¶</a></h2>
|
<h2 id="with-helm">With Helm<a class="headerlink" href="#with-helm" title="Permanent link"> ¶</a></h2>
|
||||||
<p>If you installed ingress-nginx using the Helm command in the deployment docs so its name is <code class="codehilite">ngx-ingress</code>,
|
<p>If you installed ingress-nginx using the Helm command in the deployment docs so its name is <code class="codehilite">ngx-ingress</code>,
|
||||||
you should be able to upgrade using</p>
|
you should be able to upgrade using</p>
|
||||||
<div class="codehilite"><pre><span></span>helm upgrade --reuse-values ngx-ingress stable/nginx-ingress
|
<div class="codehilite"><pre><span></span>helm upgrade --reuse-values ngx-ingress stable/nginx-ingress
|
||||||
|
|
|
@ -1341,14 +1341,14 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/validating-webhook.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/deploy/validating-webhook.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="validating-webhook-admission-controller">Validating webhook (admission controller)<a class="headerlink" href="#validating-webhook-admission-controller" title="Permanent link">¶</a></h1>
|
<h1 id="validating-webhook-admission-controller">Validating webhook (admission controller)<a class="headerlink" href="#validating-webhook-admission-controller" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">¶</a></h2>
|
<h2 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Nginx ingress controller offers the option to validate ingresses before they enter the cluster, ensuring controller will generate a valid configuration.</p>
|
<p>Nginx ingress controller offers the option to validate ingresses before they enter the cluster, ensuring controller will generate a valid configuration.</p>
|
||||||
<p>This controller is called, when <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">ValidatingAdmissionWebhook</a> is enabled, by the Kubernetes API server each time a new ingress is to enter the cluster, and rejects objects for which the generated nginx configuration fails to be validated.</p>
|
<p>This controller is called, when <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">ValidatingAdmissionWebhook</a> is enabled, by the Kubernetes API server each time a new ingress is to enter the cluster, and rejects objects for which the generated nginx configuration fails to be validated.</p>
|
||||||
<p>This feature requires some further configuration of the cluster, hence it is an optional feature, this section explains how to enable it for your cluster.</p>
|
<p>This feature requires some further configuration of the cluster, hence it is an optional feature, this section explains how to enable it for your cluster.</p>
|
||||||
<h2 id="configure-the-webhook">Configure the webhook<a class="headerlink" href="#configure-the-webhook" title="Permanent link">¶</a></h2>
|
<h2 id="configure-the-webhook">Configure the webhook<a class="headerlink" href="#configure-the-webhook" title="Permanent link"> ¶</a></h2>
|
||||||
<h3 id="generate-the-webhook-certificate">Generate the webhook certificate<a class="headerlink" href="#generate-the-webhook-certificate" title="Permanent link">¶</a></h3>
|
<h3 id="generate-the-webhook-certificate">Generate the webhook certificate<a class="headerlink" href="#generate-the-webhook-certificate" title="Permanent link"> ¶</a></h3>
|
||||||
<h4 id="self-signed-certificate">Self signed certificate<a class="headerlink" href="#self-signed-certificate" title="Permanent link">¶</a></h4>
|
<h4 id="self-signed-certificate">Self signed certificate<a class="headerlink" href="#self-signed-certificate" title="Permanent link"> ¶</a></h4>
|
||||||
<p>Validating webhook must be served using TLS, you need to generate a certificate. Note that kube API server is checking the hostname of the certificate, the common name of your certificate will need to match the service name.</p>
|
<p>Validating webhook must be served using TLS, you need to generate a certificate. Note that kube API server is checking the hostname of the certificate, the common name of your certificate will need to match the service name.</p>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">Example</p>
|
<p class="admonition-title">Example</p>
|
||||||
|
@ -1357,7 +1357,7 @@
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h5 id="using-kubernetes-ca">Using Kubernetes CA<a class="headerlink" href="#using-kubernetes-ca" title="Permanent link">¶</a></h5>
|
<h5 id="using-kubernetes-ca">Using Kubernetes CA<a class="headerlink" href="#using-kubernetes-ca" title="Permanent link"> ¶</a></h5>
|
||||||
<p>Kubernetes also provides primitives to sign a certificate request. Here is an example on how to use it</p>
|
<p>Kubernetes also provides primitives to sign a certificate request. Here is an example on how to use it</p>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">Example</p>
|
<p class="admonition-title">Example</p>
|
||||||
|
@ -1426,7 +1426,7 @@ kubectl create secret generic ingress-nginx.svc <span class="se">\</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h4 id="using-helm">Using helm<a class="headerlink" href="#using-helm" title="Permanent link">¶</a></h4>
|
<h4 id="using-helm">Using helm<a class="headerlink" href="#using-helm" title="Permanent link"> ¶</a></h4>
|
||||||
<p>To generate the certificate using helm, you can use the following snippet</p>
|
<p>To generate the certificate using helm, you can use the following snippet</p>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">Example</p>
|
<p class="admonition-title">Example</p>
|
||||||
|
@ -1436,7 +1436,7 @@ kubectl create secret generic ingress-nginx.svc <span class="se">\</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h3 id="ingress-controller-flags">Ingress controller flags<a class="headerlink" href="#ingress-controller-flags" title="Permanent link">¶</a></h3>
|
<h3 id="ingress-controller-flags">Ingress controller flags<a class="headerlink" href="#ingress-controller-flags" title="Permanent link"> ¶</a></h3>
|
||||||
<p>To enable the feature in the ingress controller, you <em>need</em> to provide 3 flags to the command line.</p>
|
<p>To enable the feature in the ingress controller, you <em>need</em> to provide 3 flags to the command line.</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1464,10 +1464,10 @@ kubectl create secret generic ingress-nginx.svc <span class="se">\</span>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 id="kube-api-server-flags">kube API server flags<a class="headerlink" href="#kube-api-server-flags" title="Permanent link">¶</a></h3>
|
<h3 id="kube-api-server-flags">kube API server flags<a class="headerlink" href="#kube-api-server-flags" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Validating webhook feature requires specific setup on the kube API server side. Depending on your kubernetes version, the flag can, or not, be enabled by default.
|
<p>Validating webhook feature requires specific setup on the kube API server side. Depending on your kubernetes version, the flag can, or not, be enabled by default.
|
||||||
To check that your kube API server runs with the required flags, please refer to the <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">kubernetes</a> documentation.</p>
|
To check that your kube API server runs with the required flags, please refer to the <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">kubernetes</a> documentation.</p>
|
||||||
<h3 id="additional-kubernetes-objects">Additional kubernetes objects<a class="headerlink" href="#additional-kubernetes-objects" title="Permanent link">¶</a></h3>
|
<h3 id="additional-kubernetes-objects">Additional kubernetes objects<a class="headerlink" href="#additional-kubernetes-objects" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Once both the ingress controller and the kube API server are configured to serve the webhook, add the you can configure the webhook with the following objects:</p>
|
<p>Once both the ingress controller and the kube API server are configured to serve the webhook, add the you can configure the webhook with the following objects:</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>
|
<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">Service</span>
|
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Service</span>
|
||||||
|
|
|
@ -1357,11 +1357,11 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/development.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/development.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="developing-for-nginx-ingress-controller">Developing for NGINX Ingress Controller<a class="headerlink" href="#developing-for-nginx-ingress-controller" title="Permanent link">¶</a></h1>
|
<h1 id="developing-for-nginx-ingress-controller">Developing for NGINX Ingress Controller<a class="headerlink" href="#developing-for-nginx-ingress-controller" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This document explains how to get started with developing for NGINX Ingress controller.
|
<p>This document explains how to get started with developing for NGINX Ingress controller.
|
||||||
It includes how to build, test, and release ingress controllers.</p>
|
It includes how to build, test, and release ingress controllers.</p>
|
||||||
<h2 id="quick-start">Quick Start<a class="headerlink" href="#quick-start" title="Permanent link">¶</a></h2>
|
<h2 id="quick-start">Quick Start<a class="headerlink" href="#quick-start" title="Permanent link"> ¶</a></h2>
|
||||||
<h3 id="getting-the-code">Getting the code<a class="headerlink" href="#getting-the-code" title="Permanent link">¶</a></h3>
|
<h3 id="getting-the-code">Getting the code<a class="headerlink" href="#getting-the-code" title="Permanent link"> ¶</a></h3>
|
||||||
<p>The code must be checked out as a subdirectory of k8s.io, and not github.com.</p>
|
<p>The code must be checked out as a subdirectory of k8s.io, and not github.com.</p>
|
||||||
<div class="codehilite"><pre><span></span>mkdir -p $GOPATH/src/k8s.io
|
<div class="codehilite"><pre><span></span>mkdir -p $GOPATH/src/k8s.io
|
||||||
cd $GOPATH/src/k8s.io
|
cd $GOPATH/src/k8s.io
|
||||||
|
@ -1370,7 +1370,7 @@ git clone https://github.com/$YOUR_GITHUB_USERNAME/ingress-nginx.git
|
||||||
cd ingress-nginx
|
cd ingress-nginx
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="initial-developer-environment-build">Initial developer environment build<a class="headerlink" href="#initial-developer-environment-build" title="Permanent link">¶</a></h3>
|
<h3 id="initial-developer-environment-build">Initial developer environment build<a class="headerlink" href="#initial-developer-environment-build" title="Permanent link"> ¶</a></h3>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p><strong>Prequisites</strong>: Minikube must be installed.
|
<p><strong>Prequisites</strong>: Minikube must be installed.
|
||||||
See <a href="https://github.com/kubernetes/minikube/releases">releases</a> for installation instructions.</p>
|
See <a href="https://github.com/kubernetes/minikube/releases">releases</a> for installation instructions.</p>
|
||||||
|
@ -1379,7 +1379,7 @@ See <a href="https://github.com/kubernetes/minikube/releases">releases</a> for i
|
||||||
<div class="codehilite"><pre><span></span>$ make dev-env
|
<div class="codehilite"><pre><span></span>$ make dev-env
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="updating-the-deployment">Updating the deployment<a class="headerlink" href="#updating-the-deployment" title="Permanent link">¶</a></h3>
|
<h3 id="updating-the-deployment">Updating the deployment<a class="headerlink" href="#updating-the-deployment" title="Permanent link"> ¶</a></h3>
|
||||||
<p>The nginx controller container image can be rebuilt using:
|
<p>The nginx controller container image can be rebuilt using:
|
||||||
<div class="codehilite"><pre><span></span>$ <span class="nv">ARCH</span><span class="o">=</span>amd64 <span class="nv">TAG</span><span class="o">=</span>dev <span class="nv">REGISTRY</span><span class="o">=</span><span class="nv">$USER</span>/ingress-controller make build container
|
<div class="codehilite"><pre><span></span>$ <span class="nv">ARCH</span><span class="o">=</span>amd64 <span class="nv">TAG</span><span class="o">=</span>dev <span class="nv">REGISTRY</span><span class="o">=</span><span class="nv">$USER</span>/ingress-controller make build container
|
||||||
</pre></div></p>
|
</pre></div></p>
|
||||||
|
@ -1387,7 +1387,7 @@ See <a href="https://github.com/kubernetes/minikube/releases">releases</a> for i
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl get pods -n ingress-nginx
|
<div class="codehilite"><pre><span></span>$ kubectl get pods -n ingress-nginx
|
||||||
$ kubectl delete pod -n ingress-nginx nginx-ingress-controller-<unique-pod-id>
|
$ kubectl delete pod -n ingress-nginx nginx-ingress-controller-<unique-pod-id>
|
||||||
</pre></div></p>
|
</pre></div></p>
|
||||||
<h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" title="Permanent link">¶</a></h2>
|
<h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The build uses dependencies in the <code class="codehilite">vendor</code> directory, which
|
<p>The build uses dependencies in the <code class="codehilite">vendor</code> directory, which
|
||||||
must be installed before building a binary/image. Occasionally, you
|
must be installed before building a binary/image. Occasionally, you
|
||||||
might need to update the dependencies.</p>
|
might need to update the dependencies.</p>
|
||||||
|
@ -1414,7 +1414,7 @@ might need to update the dependencies.</p>
|
||||||
<span class="gp">$</span> dep prune
|
<span class="gp">$</span> dep prune
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="building">Building<a class="headerlink" href="#building" title="Permanent link">¶</a></h2>
|
<h2 id="building">Building<a class="headerlink" href="#building" title="Permanent link"> ¶</a></h2>
|
||||||
<p>All ingress controllers are built through a Makefile. Depending on your
|
<p>All ingress controllers are built through a Makefile. Depending on your
|
||||||
requirements you can build a raw server binary, a local container image,
|
requirements you can build a raw server binary, a local container image,
|
||||||
or push an image to a remote repository.</p>
|
or push an image to a remote repository.</p>
|
||||||
|
@ -1427,7 +1427,7 @@ or push an image to a remote repository.</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>To find the registry simply run: <code class="codehilite">docker system info | grep Registry</code></p>
|
<p>To find the registry simply run: <code class="codehilite">docker system info | grep Registry</code></p>
|
||||||
<h3 id="building-the-e2e-test-image">Building the e2e test image<a class="headerlink" href="#building-the-e2e-test-image" title="Permanent link">¶</a></h3>
|
<h3 id="building-the-e2e-test-image">Building the e2e test image<a class="headerlink" href="#building-the-e2e-test-image" title="Permanent link"> ¶</a></h3>
|
||||||
<p>The e2e test image can also be built through the Makefile.</p>
|
<p>The e2e test image can also be built through the Makefile.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> make e2e-test-image
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> make e2e-test-image
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1436,7 +1436,7 @@ or push an image to a remote repository.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> docker save nginx-ingress-controller:e2e <span class="p">|</span> <span class="o">(</span><span class="nb">eval</span> <span class="k">$(</span>minikube docker-env<span class="k">)</span> <span class="o">&&</span> docker load<span class="o">)</span>
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> docker save nginx-ingress-controller:e2e <span class="p">|</span> <span class="o">(</span><span class="nb">eval</span> <span class="k">$(</span>minikube docker-env<span class="k">)</span> <span class="o">&&</span> docker load<span class="o">)</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="nginx-controller">Nginx Controller<a class="headerlink" href="#nginx-controller" title="Permanent link">¶</a></h3>
|
<h3 id="nginx-controller">Nginx Controller<a class="headerlink" href="#nginx-controller" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Build a raw server binary
|
<p>Build a raw server binary
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> make build
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> make build
|
||||||
</pre></div></p>
|
</pre></div></p>
|
||||||
|
@ -1449,10 +1449,10 @@ or push an image to a remote repository.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nv">TAG</span><span class="o">=</span><tag> <span class="nv">REGISTRY</span><span class="o">=</span><span class="nv">$USER</span>/ingress-controller make push
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nv">TAG</span><span class="o">=</span><tag> <span class="nv">REGISTRY</span><span class="o">=</span><span class="nv">$USER</span>/ingress-controller make push
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="deploying">Deploying<a class="headerlink" href="#deploying" title="Permanent link">¶</a></h2>
|
<h2 id="deploying">Deploying<a class="headerlink" href="#deploying" title="Permanent link"> ¶</a></h2>
|
||||||
<p>There are several ways to deploy the ingress controller onto a cluster.
|
<p>There are several ways to deploy the ingress controller onto a cluster.
|
||||||
Please check the <a href="./deploy">deployment guide</a></p>
|
Please check the <a href="../deploy/">deployment guide</a></p>
|
||||||
<h2 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link">¶</a></h2>
|
<h2 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link"> ¶</a></h2>
|
||||||
<p>To run unit-tests, just run</p>
|
<p>To run unit-tests, just run</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/k8s.io/ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/k8s.io/ingress-nginx
|
||||||
<span class="gp">$</span> make <span class="nb">test</span>
|
<span class="gp">$</span> make <span class="nb">test</span>
|
||||||
|
@ -1463,7 +1463,7 @@ Please check the <a href="./deploy">deployment guide</a></p>
|
||||||
<span class="gp">$</span> make e2e-test
|
<span class="gp">$</span> make e2e-test
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>NOTE: if your e2e pod keeps hanging in an ImagePullBackoff, make sure you've made your e2e nginx-ingress-controller image available to minikube as explained in <a href="./Building the e2e test image">Building the e2e test image</a></p>
|
<p>NOTE: if your e2e pod keeps hanging in an ImagePullBackoff, make sure you've made your e2e nginx-ingress-controller image available to minikube as explained in the <strong>Building the e2e test image</strong> section</p>
|
||||||
<p>To run unit-tests for lua code locally, run:</p>
|
<p>To run unit-tests for lua code locally, run:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/k8s.io/ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> <span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/k8s.io/ingress-nginx
|
||||||
<span class="gp">$</span> ./rootfs/etc/nginx/lua/test/up.sh
|
<span class="gp">$</span> ./rootfs/etc/nginx/lua/test/up.sh
|
||||||
|
@ -1471,7 +1471,7 @@ Please check the <a href="./deploy">deployment guide</a></p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Lua tests are located in <code class="codehilite">$GOPATH/src/k8s.io/ingress-nginx/rootfs/etc/nginx/lua/test</code>. When creating a new test file it must follow the naming convention <code class="codehilite"><mytest>_test.lua</code> or it will be ignored.</p>
|
<p>Lua tests are located in <code class="codehilite">$GOPATH/src/k8s.io/ingress-nginx/rootfs/etc/nginx/lua/test</code>. When creating a new test file it must follow the naming convention <code class="codehilite"><mytest>_test.lua</code> or it will be ignored.</p>
|
||||||
<h2 id="releasing">Releasing<a class="headerlink" href="#releasing" title="Permanent link">¶</a></h2>
|
<h2 id="releasing">Releasing<a class="headerlink" href="#releasing" title="Permanent link"> ¶</a></h2>
|
||||||
<p>All Makefiles will produce a release binary, as shown above. To publish this
|
<p>All Makefiles will produce a release binary, as shown above. To publish this
|
||||||
to a wider Kubernetes user base, push the image to a container registry, like
|
to a wider Kubernetes user base, push the image to a container registry, like
|
||||||
<a href="https://cloud.google.com/container-registry/">gcr.io</a>. All release images are hosted under <code class="codehilite">gcr.io/google_containers</code> and
|
<a href="https://cloud.google.com/container-registry/">gcr.io</a>. All release images are hosted under <code class="codehilite">gcr.io/google_containers</code> and
|
||||||
|
|
|
@ -1219,8 +1219,8 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/20190724-only-dynamic-ssl.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/20190724-only-dynamic-ssl.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="remove-static-ssl-configuration-mode">Remove static SSL configuration mode<a class="headerlink" href="#remove-static-ssl-configuration-mode" title="Permanent link">¶</a></h1>
|
<h1 id="remove-static-ssl-configuration-mode">Remove static SSL configuration mode<a class="headerlink" href="#remove-static-ssl-configuration-mode" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link">¶</a></h2>
|
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link"> ¶</a></h2>
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1234,30 +1234,30 @@
|
||||||
<li><a href="#alternatives">Alternatives</a>
|
<li><a href="#alternatives">Alternatives</a>
|
||||||
<!-- /toc --></li>
|
<!-- /toc --></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">¶</a></h2>
|
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Since release <a href="https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.19.0">0.19.0</a> is possible to configure SSL certificates without the need of NGINX reloads (thanks to lua) and after release <a href="https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.19.0">0.24.0</a> the default enabled mode is dynamic.</p>
|
<p>Since release <a href="https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.19.0">0.19.0</a> is possible to configure SSL certificates without the need of NGINX reloads (thanks to lua) and after release <a href="https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.19.0">0.24.0</a> the default enabled mode is dynamic.</p>
|
||||||
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link">¶</a></h2>
|
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The static configuration implies reloads, something that affects the majority of the users.</p>
|
<p>The static configuration implies reloads, something that affects the majority of the users.</p>
|
||||||
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link">¶</a></h3>
|
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link"> ¶</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Deprecation of the flag <code class="codehilite">--enable-dynamic-certificates</code>.</li>
|
<li>Deprecation of the flag <code class="codehilite">--enable-dynamic-certificates</code>.</li>
|
||||||
<li>Cleanup of the codebase.</li>
|
<li>Cleanup of the codebase.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link">¶</a></h3>
|
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link"> ¶</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Features related to certificate authentication are not changed in any way.</li>
|
<li>Features related to certificate authentication are not changed in any way.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link">¶</a></h2>
|
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link"> ¶</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Remove static SSL configuration</li>
|
<li>Remove static SSL configuration</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="implementation-detailsnotesconstraints">Implementation Details/Notes/Constraints<a class="headerlink" href="#implementation-detailsnotesconstraints" title="Permanent link">¶</a></h3>
|
<h3 id="implementation-detailsnotesconstraints">Implementation Details/Notes/Constraints<a class="headerlink" href="#implementation-detailsnotesconstraints" title="Permanent link"> ¶</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Deprecate the flag Move the directives <code class="codehilite">ssl_certificate</code> and <code class="codehilite">ssl_certificate_key</code> from each server block to the <code class="codehilite">http</code> section. These settings are required to avoid NGINX errors in the logs.</li>
|
<li>Deprecate the flag Move the directives <code class="codehilite">ssl_certificate</code> and <code class="codehilite">ssl_certificate_key</code> from each server block to the <code class="codehilite">http</code> section. These settings are required to avoid NGINX errors in the logs.</li>
|
||||||
<li>Remove any action of the flag <code class="codehilite">--enable-dynamic-certificates</code></li>
|
<li>Remove any action of the flag <code class="codehilite">--enable-dynamic-certificates</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="drawbacks">Drawbacks<a class="headerlink" href="#drawbacks" title="Permanent link">¶</a></h2>
|
<h2 id="drawbacks">Drawbacks<a class="headerlink" href="#drawbacks" title="Permanent link"> ¶</a></h2>
|
||||||
<h2 id="alternatives">Alternatives<a class="headerlink" href="#alternatives" title="Permanent link">¶</a></h2>
|
<h2 id="alternatives">Alternatives<a class="headerlink" href="#alternatives" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Keep both implementations</p>
|
<p>Keep both implementations</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1206,8 +1206,8 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/20190815-zone-aware-routing.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/20190815-zone-aware-routing.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="availability-zone-aware-routing">Availability zone aware routing<a class="headerlink" href="#availability-zone-aware-routing" title="Permanent link">¶</a></h1>
|
<h1 id="availability-zone-aware-routing">Availability zone aware routing<a class="headerlink" href="#availability-zone-aware-routing" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link">¶</a></h2>
|
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link"> ¶</a></h2>
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1220,9 +1220,9 @@
|
||||||
<li><a href="#drawbacks-optional">Drawbacks [optional]</a>
|
<li><a href="#drawbacks-optional">Drawbacks [optional]</a>
|
||||||
<!-- /toc --></li>
|
<!-- /toc --></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">¶</a></h2>
|
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Teach ingress-nginx about availability zones where endpoints are running in. This way ingress-nginx pod will do its best to proxy to zone-local endpoint.</p>
|
<p>Teach ingress-nginx about availability zones where endpoints are running in. This way ingress-nginx pod will do its best to proxy to zone-local endpoint.</p>
|
||||||
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link">¶</a></h2>
|
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>When users run their services across multiple availability zones they usually pay for egress traffic between zones. Providers such as GCP, Amazon EC charges money for that.
|
<p>When users run their services across multiple availability zones they usually pay for egress traffic between zones. Providers such as GCP, Amazon EC charges money for that.
|
||||||
ingress-nginx when picking an endpoint to route request to does not consider whether the endpoint is in different zone or the same one. That means it's at least equally likely
|
ingress-nginx when picking an endpoint to route request to does not consider whether the endpoint is in different zone or the same one. That means it's at least equally likely
|
||||||
that it will pick an endpoint from another zone and proxy the request to it. In this situation response from the endpoint to ingress-nginx pod is considered as
|
that it will pick an endpoint from another zone and proxy the request to it. In this situation response from the endpoint to ingress-nginx pod is considered as
|
||||||
|
@ -1231,18 +1231,18 @@ inter zone traffic and costs money.</p>
|
||||||
According to https://datapath.io/resources/blog/what-are-aws-data-transfer-costs-and-how-to-minimize-them/ Amazon also charges the same amount of money sa GCP for cross zone, egress traffic.</p>
|
According to https://datapath.io/resources/blog/what-are-aws-data-transfer-costs-and-how-to-minimize-them/ Amazon also charges the same amount of money sa GCP for cross zone, egress traffic.</p>
|
||||||
<p>This can be a lot of money depending on once's traffic. By teaching ingress-nginx about zones we can eliminate or at least decrease this cost.</p>
|
<p>This can be a lot of money depending on once's traffic. By teaching ingress-nginx about zones we can eliminate or at least decrease this cost.</p>
|
||||||
<p>Arguably inter-zone network latency should also be better than cross zone.</p>
|
<p>Arguably inter-zone network latency should also be better than cross zone.</p>
|
||||||
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link">¶</a></h3>
|
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link"> ¶</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Given a regional cluster running ingress-nginx, ingress-nginx should do best effort to pick zone-local endpoint when proxying</li>
|
<li>Given a regional cluster running ingress-nginx, ingress-nginx should do best effort to pick zone-local endpoint when proxying</li>
|
||||||
<li>This should not impact canary feature</li>
|
<li>This should not impact canary feature</li>
|
||||||
<li>ingress-nginx should be able to operate successfully if there's no zonal endpoints</li>
|
<li>ingress-nginx should be able to operate successfully if there's no zonal endpoints</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link">¶</a></h3>
|
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link"> ¶</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>This feature inherently assumes that endpoints are distributed across zones in a way that they can handle all the traffic from ingress-nginx pod(s) in that zone</li>
|
<li>This feature inherently assumes that endpoints are distributed across zones in a way that they can handle all the traffic from ingress-nginx pod(s) in that zone</li>
|
||||||
<li>This feature will be relying on https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/#failure-domainbetakubernetesiozone, it is not this KEP's goal to support other cases</li>
|
<li>This feature will be relying on https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/#failure-domainbetakubernetesiozone, it is not this KEP's goal to support other cases</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link">¶</a></h2>
|
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The idea here is to have controller part of ingress-nginx to (1) detect what zone its current pod is running in and (2) detect the zone for every endpoints it knows about.
|
<p>The idea here is to have controller part of ingress-nginx to (1) detect what zone its current pod is running in and (2) detect the zone for every endpoints it knows about.
|
||||||
After that it will post that data as part of endpoints to Lua land. Then Lua balancer when picking an endpoint will try to pick zone-local endpoint first and
|
After that it will post that data as part of endpoints to Lua land. Then Lua balancer when picking an endpoint will try to pick zone-local endpoint first and
|
||||||
if there is no zone-local endpoint then it will fallback to current behaviour.</p>
|
if there is no zone-local endpoint then it will fallback to current behaviour.</p>
|
||||||
|
@ -1269,12 +1269,12 @@ needs to serve the request, we will first try to use zonal balancer for that bac
|
||||||
then we will use general balancer. In case of zonal outages we assume that readiness probe will fail and controller will
|
then we will use general balancer. In case of zonal outages we assume that readiness probe will fail and controller will
|
||||||
see no endpoints for the backend and therefore we will use general balancer.</p>
|
see no endpoints for the backend and therefore we will use general balancer.</p>
|
||||||
<p>We can enable the feature using a configmap setting. Doing it this way makes it easier to rollback in case of a problem.</p>
|
<p>We can enable the feature using a configmap setting. Doing it this way makes it easier to rollback in case of a problem.</p>
|
||||||
<h2 id="implementation-history">Implementation History<a class="headerlink" href="#implementation-history" title="Permanent link">¶</a></h2>
|
<h2 id="implementation-history">Implementation History<a class="headerlink" href="#implementation-history" title="Permanent link"> ¶</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>initial version of KEP is shipped</li>
|
<li>initial version of KEP is shipped</li>
|
||||||
<li>proposal and implementation details is done</li>
|
<li>proposal and implementation details is done</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="drawbacks-optional">Drawbacks [optional]<a class="headerlink" href="#drawbacks-optional" title="Permanent link">¶</a></h2>
|
<h2 id="drawbacks-optional">Drawbacks [optional]<a class="headerlink" href="#drawbacks-optional" title="Permanent link"> ¶</a></h2>
|
||||||
<p>More load on the Kubernetes API server.</p>
|
<p>More load on the Kubernetes API server.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1293,7 +1293,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/YYYYMMDD-kep-template.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/YYYYMMDD-kep-template.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="title">Title<a class="headerlink" href="#title" title="Permanent link">¶</a></h1>
|
<h1 id="title">Title<a class="headerlink" href="#title" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This is the title of the KEP.
|
<p>This is the title of the KEP.
|
||||||
Keep it simple and descriptive.
|
Keep it simple and descriptive.
|
||||||
A good title can help communicate what the KEP is and should be considered as part of any review.</p>
|
A good title can help communicate what the KEP is and should be considered as part of any review.</p>
|
||||||
|
@ -1320,7 +1320,7 @@ A good title can help communicate what the KEP is and should be considered as pa
|
||||||
<p>The <code class="codehilite">Metadata</code> section above is intended to support the creation of tooling around the KEP process.
|
<p>The <code class="codehilite">Metadata</code> section above is intended to support the creation of tooling around the KEP process.
|
||||||
This will be a YAML section that is fenced as a code block.
|
This will be a YAML section that is fenced as a code block.
|
||||||
See the KEP process for details on each of these items.</p>
|
See the KEP process for details on each of these items.</p>
|
||||||
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link">¶</a></h2>
|
<h2 id="table-of-contents">Table of Contents<a class="headerlink" href="#table-of-contents" title="Permanent link"> ¶</a></h2>
|
||||||
<p>A table of contents is helpful for quickly jumping to sections of a KEP and for highlighting any additional information provided beyond the standard KEP template.</p>
|
<p>A table of contents is helpful for quickly jumping to sections of a KEP and for highlighting any additional information provided beyond the standard KEP template.</p>
|
||||||
<p>Ensure the TOC is wrapped with <code><!-- toc --&rt;<!-- /toc --&rt;</code> tags, and then generate with <code class="codehilite">hack/update-toc.sh</code>.</p>
|
<p>Ensure the TOC is wrapped with <code><!-- toc --&rt;<!-- /toc --&rt;</code> tags, and then generate with <code class="codehilite">hack/update-toc.sh</code>.</p>
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
@ -1348,42 +1348,42 @@ See the KEP process for details on each of these items.</p>
|
||||||
<li><a href="#alternatives-optional">Alternatives [optional]</a>
|
<li><a href="#alternatives-optional">Alternatives [optional]</a>
|
||||||
<!-- /toc --></li>
|
<!-- /toc --></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">¶</a></h2>
|
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The <code class="codehilite">Summary</code> section is incredibly important for producing high quality user-focused documentation such as release notes or a development roadmap.
|
<p>The <code class="codehilite">Summary</code> section is incredibly important for producing high quality user-focused documentation such as release notes or a development roadmap.
|
||||||
It should be possible to collect this information before implementation begins in order to avoid requiring implementors to split their attention between writing release notes and implementing the feature itself.</p>
|
It should be possible to collect this information before implementation begins in order to avoid requiring implementors to split their attention between writing release notes and implementing the feature itself.</p>
|
||||||
<p>A good summary is probably at least a paragraph in length.</p>
|
<p>A good summary is probably at least a paragraph in length.</p>
|
||||||
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link">¶</a></h2>
|
<h2 id="motivation">Motivation<a class="headerlink" href="#motivation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>This section is for explicitly listing the motivation, goals and non-goals of this KEP.
|
<p>This section is for explicitly listing the motivation, goals and non-goals of this KEP.
|
||||||
Describe why the change is important and the benefits to users.
|
Describe why the change is important and the benefits to users.
|
||||||
The motivation section can optionally provide links to <a href="https://github.com/golang/go/wiki/ExperienceReports">experience reports</a> to demonstrate the interest in a KEP within the wider Kubernetes community.</p>
|
The motivation section can optionally provide links to <a href="https://github.com/golang/go/wiki/ExperienceReports">experience reports</a> to demonstrate the interest in a KEP within the wider Kubernetes community.</p>
|
||||||
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link">¶</a></h3>
|
<h3 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link"> ¶</a></h3>
|
||||||
<p>List the specific goals of the KEP.
|
<p>List the specific goals of the KEP.
|
||||||
How will we know that this has succeeded?</p>
|
How will we know that this has succeeded?</p>
|
||||||
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link">¶</a></h3>
|
<h3 id="non-goals">Non-Goals<a class="headerlink" href="#non-goals" title="Permanent link"> ¶</a></h3>
|
||||||
<p>What is out of scope for this KEP?
|
<p>What is out of scope for this KEP?
|
||||||
Listing non-goals helps to focus discussion and make progress.</p>
|
Listing non-goals helps to focus discussion and make progress.</p>
|
||||||
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link">¶</a></h2>
|
<h2 id="proposal">Proposal<a class="headerlink" href="#proposal" title="Permanent link"> ¶</a></h2>
|
||||||
<p>This is where we get down to the nitty gritty of what the proposal actually is.</p>
|
<p>This is where we get down to the nitty gritty of what the proposal actually is.</p>
|
||||||
<h3 id="user-stories-optional">User Stories [optional]<a class="headerlink" href="#user-stories-optional" title="Permanent link">¶</a></h3>
|
<h3 id="user-stories-optional">User Stories [optional]<a class="headerlink" href="#user-stories-optional" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Detail the things that people will be able to do if this KEP is implemented.
|
<p>Detail the things that people will be able to do if this KEP is implemented.
|
||||||
Include as much detail as possible so that people can understand the "how" of the system.
|
Include as much detail as possible so that people can understand the "how" of the system.
|
||||||
The goal here is to make this feel real for users without getting bogged down.</p>
|
The goal here is to make this feel real for users without getting bogged down.</p>
|
||||||
<h4 id="story-1">Story 1<a class="headerlink" href="#story-1" title="Permanent link">¶</a></h4>
|
<h4 id="story-1">Story 1<a class="headerlink" href="#story-1" title="Permanent link"> ¶</a></h4>
|
||||||
<h4 id="story-2">Story 2<a class="headerlink" href="#story-2" title="Permanent link">¶</a></h4>
|
<h4 id="story-2">Story 2<a class="headerlink" href="#story-2" title="Permanent link"> ¶</a></h4>
|
||||||
<h3 id="implementation-detailsnotesconstraints-optional">Implementation Details/Notes/Constraints [optional]<a class="headerlink" href="#implementation-detailsnotesconstraints-optional" title="Permanent link">¶</a></h3>
|
<h3 id="implementation-detailsnotesconstraints-optional">Implementation Details/Notes/Constraints [optional]<a class="headerlink" href="#implementation-detailsnotesconstraints-optional" title="Permanent link"> ¶</a></h3>
|
||||||
<p>What are the caveats to the implementation?
|
<p>What are the caveats to the implementation?
|
||||||
What are some important details that didn't come across above.
|
What are some important details that didn't come across above.
|
||||||
Go in to as much detail as necessary here.
|
Go in to as much detail as necessary here.
|
||||||
This might be a good place to talk about core concepts and how they releate.</p>
|
This might be a good place to talk about core concepts and how they releate.</p>
|
||||||
<h3 id="risks-and-mitigations">Risks and Mitigations<a class="headerlink" href="#risks-and-mitigations" title="Permanent link">¶</a></h3>
|
<h3 id="risks-and-mitigations">Risks and Mitigations<a class="headerlink" href="#risks-and-mitigations" title="Permanent link"> ¶</a></h3>
|
||||||
<p>What are the risks of this proposal and how do we mitigate.
|
<p>What are the risks of this proposal and how do we mitigate.
|
||||||
Think broadly.
|
Think broadly.
|
||||||
For example, consider both security and how this will impact the larger kubernetes ecosystem.</p>
|
For example, consider both security and how this will impact the larger kubernetes ecosystem.</p>
|
||||||
<p>How will security be reviewed and by whom?
|
<p>How will security be reviewed and by whom?
|
||||||
How will UX be reviewed and by whom?</p>
|
How will UX be reviewed and by whom?</p>
|
||||||
<p>Consider including folks that also work outside project.</p>
|
<p>Consider including folks that also work outside project.</p>
|
||||||
<h2 id="design-details">Design Details<a class="headerlink" href="#design-details" title="Permanent link">¶</a></h2>
|
<h2 id="design-details">Design Details<a class="headerlink" href="#design-details" title="Permanent link"> ¶</a></h2>
|
||||||
<h3 id="test-plan">Test Plan<a class="headerlink" href="#test-plan" title="Permanent link">¶</a></h3>
|
<h3 id="test-plan">Test Plan<a class="headerlink" href="#test-plan" title="Permanent link"> ¶</a></h3>
|
||||||
<p><strong>Note:</strong> <em>Section not required until targeted at a release.</em></p>
|
<p><strong>Note:</strong> <em>Section not required until targeted at a release.</em></p>
|
||||||
<p>Consider the following in developing a test plan for this enhancement:</p>
|
<p>Consider the following in developing a test plan for this enhancement:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1394,14 +1394,14 @@ How will UX be reviewed and by whom?</p>
|
||||||
Anything that would count as tricky in the implementation and anything particularly challenging to test should be called out.</p>
|
Anything that would count as tricky in the implementation and anything particularly challenging to test should be called out.</p>
|
||||||
<p>All code is expected to have adequate tests (eventually with coverage expectations).
|
<p>All code is expected to have adequate tests (eventually with coverage expectations).
|
||||||
Please adhere to the <a href="https://git.k8s.io/community/contributors/devel/sig-testing/testing.md">Kubernetes testing guidelines</a> when drafting this test plan.</p>
|
Please adhere to the <a href="https://git.k8s.io/community/contributors/devel/sig-testing/testing.md">Kubernetes testing guidelines</a> when drafting this test plan.</p>
|
||||||
<h4 id="removing-a-deprecated-flag">Removing a deprecated flag<a class="headerlink" href="#removing-a-deprecated-flag" title="Permanent link">¶</a></h4>
|
<h4 id="removing-a-deprecated-flag">Removing a deprecated flag<a class="headerlink" href="#removing-a-deprecated-flag" title="Permanent link"> ¶</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Announce deprecation and support policy of the existing flag</li>
|
<li>Announce deprecation and support policy of the existing flag</li>
|
||||||
<li>Two versions passed since introducing the functionality which deprecates the flag (to address version skew)</li>
|
<li>Two versions passed since introducing the functionality which deprecates the flag (to address version skew)</li>
|
||||||
<li>Address feedback on usage/changed behavior, provided on GitHub issues</li>
|
<li>Address feedback on usage/changed behavior, provided on GitHub issues</li>
|
||||||
<li>Deprecate the flag</li>
|
<li>Deprecate the flag</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="implementation-history">Implementation History<a class="headerlink" href="#implementation-history" title="Permanent link">¶</a></h2>
|
<h2 id="implementation-history">Implementation History<a class="headerlink" href="#implementation-history" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Major milestones in the life cycle of a KEP should be tracked in <code class="codehilite">Implementation History</code>.
|
<p>Major milestones in the life cycle of a KEP should be tracked in <code class="codehilite">Implementation History</code>.
|
||||||
Major milestones might include</p>
|
Major milestones might include</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1412,9 +1412,9 @@ Major milestones might include</p>
|
||||||
<li>the version of Kubernetes where the KEP graduated to general availability</li>
|
<li>the version of Kubernetes where the KEP graduated to general availability</li>
|
||||||
<li>when the KEP was retired or superseded</li>
|
<li>when the KEP was retired or superseded</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="drawbacks-optional">Drawbacks [optional]<a class="headerlink" href="#drawbacks-optional" title="Permanent link">¶</a></h2>
|
<h2 id="drawbacks-optional">Drawbacks [optional]<a class="headerlink" href="#drawbacks-optional" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Why should this KEP <em>not</em> be implemented.</p>
|
<p>Why should this KEP <em>not</em> be implemented.</p>
|
||||||
<h2 id="alternatives-optional">Alternatives [optional]<a class="headerlink" href="#alternatives-optional" title="Permanent link">¶</a></h2>
|
<h2 id="alternatives-optional">Alternatives [optional]<a class="headerlink" href="#alternatives-optional" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Similar to the <code class="codehilite">Drawbacks</code> section the <code class="codehilite">Alternatives</code> section is used to highlight and record other possible approaches to delivering the value proposed by a KEP.</p>
|
<p>Similar to the <code class="codehilite">Drawbacks</code> section the <code class="codehilite">Alternatives</code> section is used to highlight and record other possible approaches to delivering the value proposed by a KEP.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1171,15 +1171,15 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/enhancements/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="kubernetes-enhancement-proposals-keps">Kubernetes Enhancement Proposals (KEPs)<a class="headerlink" href="#kubernetes-enhancement-proposals-keps" title="Permanent link">¶</a></h1>
|
<h1 id="kubernetes-enhancement-proposals-keps">Kubernetes Enhancement Proposals (KEPs)<a class="headerlink" href="#kubernetes-enhancement-proposals-keps" title="Permanent link"> ¶</a></h1>
|
||||||
<p>A Kubernetes Enhancement Proposal (KEP) is a way to propose, communicate and coordinate on new efforts for the Kubernetes project. For this reason, the <code class="codehilite">ingress-nginx</code> project is adopting it.</p>
|
<p>A Kubernetes Enhancement Proposal (KEP) is a way to propose, communicate and coordinate on new efforts for the Kubernetes project. For this reason, the <code class="codehilite">ingress-nginx</code> project is adopting it.</p>
|
||||||
<h2 id="quick-start-for-the-kep-process">Quick start for the KEP process<a class="headerlink" href="#quick-start-for-the-kep-process" title="Permanent link">¶</a></h2>
|
<h2 id="quick-start-for-the-kep-process">Quick start for the KEP process<a class="headerlink" href="#quick-start-for-the-kep-process" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Follow the process outlined in the <a href="YYYYMMDD-kep-template/">KEP template</a></p>
|
<p>Follow the process outlined in the <a href="YYYYMMDD-kep-template/">KEP template</a></p>
|
||||||
<h3 id="do-i-have-to-use-the-kep-process">Do I have to use the KEP process?<a class="headerlink" href="#do-i-have-to-use-the-kep-process" title="Permanent link">¶</a></h3>
|
<h3 id="do-i-have-to-use-the-kep-process">Do I have to use the KEP process?<a class="headerlink" href="#do-i-have-to-use-the-kep-process" title="Permanent link"> ¶</a></h3>
|
||||||
<p>No... but we hope that you will.
|
<p>No... but we hope that you will.
|
||||||
Over time having a rich set of KEPs in one place will make it easier for people to track what is going on in the community and find a structured historic record.</p>
|
Over time having a rich set of KEPs in one place will make it easier for people to track what is going on in the community and find a structured historic record.</p>
|
||||||
<p>KEPs are only required when the changes are wide ranging and impact most of the project.</p>
|
<p>KEPs are only required when the changes are wide ranging and impact most of the project.</p>
|
||||||
<h3 id="why-would-i-want-to-use-the-kep-process">Why would I want to use the KEP process?<a class="headerlink" href="#why-would-i-want-to-use-the-kep-process" title="Permanent link">¶</a></h3>
|
<h3 id="why-would-i-want-to-use-the-kep-process">Why would I want to use the KEP process?<a class="headerlink" href="#why-would-i-want-to-use-the-kep-process" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Our aim with KEPs is to clearly communicate new efforts to the Kubernetes contributor community.
|
<p>Our aim with KEPs is to clearly communicate new efforts to the Kubernetes contributor community.
|
||||||
As such, we want to build a well curated set of clear proposals in a common format with useful metadata.</p>
|
As such, we want to build a well curated set of clear proposals in a common format with useful metadata.</p>
|
||||||
<p>Benefits to KEP users (in the limit):</p>
|
<p>Benefits to KEP users (in the limit):</p>
|
||||||
|
|
|
@ -1221,9 +1221,9 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/PREREQUISITES.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/PREREQUISITES.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h1>
|
<h1 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link"> ¶</a></h1>
|
||||||
<p>Many of the examples in this directory have common prerequisites.</p>
|
<p>Many of the examples in this directory have common prerequisites.</p>
|
||||||
<h2 id="tls-certificates">TLS certificates<a class="headerlink" href="#tls-certificates" title="Permanent link">¶</a></h2>
|
<h2 id="tls-certificates">TLS certificates<a class="headerlink" href="#tls-certificates" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Unless otherwise mentioned, the TLS secret used in examples is a 2048 bit RSA
|
<p>Unless otherwise mentioned, the TLS secret used in examples is a 2048 bit RSA
|
||||||
key/cert pair with an arbitrarily chosen hostname, created as follows</p>
|
key/cert pair with an arbitrarily chosen hostname, created as follows</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> openssl req -x509 -sha256 -nodes -days <span class="m">365</span> -newkey rsa:2048 -keyout tls.key -out tls.crt -subj <span class="s2">"/CN=nginxsvc/O=nginxsvc"</span>
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> openssl req -x509 -sha256 -nodes -days <span class="m">365</span> -newkey rsa:2048 -keyout tls.key -out tls.crt -subj <span class="s2">"/CN=nginxsvc/O=nginxsvc"</span>
|
||||||
|
@ -1238,7 +1238,7 @@ key/cert pair with an arbitrarily chosen hostname, created as follows</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Note: If using CA Authentication, described below, you will need to sign the server certificate with the CA.</p>
|
<p>Note: If using CA Authentication, described below, you will need to sign the server certificate with the CA.</p>
|
||||||
<h2 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link">¶</a></h2>
|
<h2 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link"> ¶</a></h2>
|
||||||
<p>CA Authentication also known as Mutual Authentication allows both the server and client to verify each others
|
<p>CA Authentication also known as Mutual Authentication allows both the server and client to verify each others
|
||||||
identity via a common CA.</p>
|
identity via a common CA.</p>
|
||||||
<p>We have a CA Certificate which we obtain usually from a Certificate Authority and use that to sign
|
<p>We have a CA Certificate which we obtain usually from a Certificate Authority and use that to sign
|
||||||
|
@ -1260,7 +1260,7 @@ pass the client certificate.</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Once this is complete you can continue to follow the instructions <a href="../auth/client-certs/#creating-certificate-secrets">here</a></p>
|
<p>Once this is complete you can continue to follow the instructions <a href="../auth/client-certs/#creating-certificate-secrets">here</a></p>
|
||||||
<h2 id="test-http-service">Test HTTP Service<a class="headerlink" href="#test-http-service" title="Permanent link">¶</a></h2>
|
<h2 id="test-http-service">Test HTTP Service<a class="headerlink" href="#test-http-service" title="Permanent link"> ¶</a></h2>
|
||||||
<p>All examples that require a test HTTP Service use the standard http-svc pod,
|
<p>All examples that require a test HTTP Service use the standard http-svc pod,
|
||||||
which you can deploy as follows</p>
|
which you can deploy as follows</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f http-svc.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f http-svc.yaml
|
||||||
|
|
|
@ -1207,9 +1207,9 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/affinity/cookie/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/affinity/cookie/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="sticky-sessions">Sticky sessions<a class="headerlink" href="#sticky-sessions" title="Permanent link">¶</a></h1>
|
<h1 id="sticky-sessions">Sticky sessions<a class="headerlink" href="#sticky-sessions" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to achieve session affinity using cookies.</p>
|
<p>This example demonstrates how to achieve session affinity using cookies.</p>
|
||||||
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">¶</a></h2>
|
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Session affinity can be configured using the following annotations:</p>
|
<p>Session affinity can be configured using the following annotations:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1237,8 +1237,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>nginx.ingress.kubernetes.io/session-cookie-path</td>
|
<td>nginx.ingress.kubernetes.io/session-cookie-path</td>
|
||||||
<td>Path that will be set on the cookie (required if your <a href="../../../user-guide/ingress-path-matching">Ingress paths</a> use regular expressions)</td>
|
<td>Path that will be set on the cookie (required if your <a href="../../../user-guide/ingress-path-matching/">Ingress paths</a> use regular expressions)</td>
|
||||||
<td>string (defaults to the currently <a href="../../../user-guide/ingress-path-matching">matched path</a>)</td>
|
<td>string (defaults to the currently <a href="../../../user-guide/ingress-path-matching/">matched path</a>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>nginx.ingress.kubernetes.io/session-cookie-max-age</td>
|
<td>nginx.ingress.kubernetes.io/session-cookie-max-age</td>
|
||||||
|
@ -1261,7 +1261,7 @@
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl create -f ingress.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl create -f ingress.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link">¶</a></h2>
|
<h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You can confirm that the Ingress works:</p>
|
<p>You can confirm that the Ingress works:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test
|
||||||
<span class="go">Name: nginx-test</span>
|
<span class="go">Name: nginx-test</span>
|
||||||
|
|
|
@ -1150,7 +1150,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/basic/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/basic/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="basic-authentication">Basic Authentication<a class="headerlink" href="#basic-authentication" title="Permanent link">¶</a></h1>
|
<h1 id="basic-authentication">Basic Authentication<a class="headerlink" href="#basic-authentication" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example shows how to add authentication in a Ingress rule using a secret that contains a file generated with <code class="codehilite">htpasswd</code>.
|
<p>This example shows how to add authentication in a Ingress rule using a secret that contains a file generated with <code class="codehilite">htpasswd</code>.
|
||||||
It's important the file generated is named <code class="codehilite">auth</code> (actually - that the secret has a key <code class="codehilite">data.auth</code>), otherwise the ingress-controller returns a 503.</p>
|
It's important the file generated is named <code class="codehilite">auth</code> (actually - that the secret has a key <code class="codehilite">data.auth</code>), otherwise the ingress-controller returns a 503.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> htpasswd -c auth foo
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> htpasswd -c auth foo
|
||||||
|
|
|
@ -1209,7 +1209,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/client-certs/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/client-certs/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link">¶</a></h1>
|
<h1 id="client-certificate-authentication">Client Certificate Authentication<a class="headerlink" href="#client-certificate-authentication" title="Permanent link"> ¶</a></h1>
|
||||||
<p>It is possible to enable Client-Certificate Authentication by adding additional annotations to your Ingress Resource.
|
<p>It is possible to enable Client-Certificate Authentication by adding additional annotations to your Ingress Resource.
|
||||||
Before getting started you must have the following Certificates Setup:</p>
|
Before getting started you must have the following Certificates Setup:</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1228,7 +1228,7 @@ Before getting started you must have the following Certificates Setup:</p>
|
||||||
|
|
||||||
<p><strong>Note:</strong> Make sure that the Key Size is greater than 1024 and Hashing Algorithm(Digest) is something better than md5
|
<p><strong>Note:</strong> Make sure that the Key Size is greater than 1024 and Hashing Algorithm(Digest) is something better than md5
|
||||||
for each certificate generated. Otherwise you will receive an error.</p>
|
for each certificate generated. Otherwise you will receive an error.</p>
|
||||||
<h2 id="creating-certificate-secrets">Creating Certificate Secrets<a class="headerlink" href="#creating-certificate-secrets" title="Permanent link">¶</a></h2>
|
<h2 id="creating-certificate-secrets">Creating Certificate Secrets<a class="headerlink" href="#creating-certificate-secrets" title="Permanent link"> ¶</a></h2>
|
||||||
<p>There are many different ways of configuring your secrets to enable Client-Certificate
|
<p>There are many different ways of configuring your secrets to enable Client-Certificate
|
||||||
Authentication to work properly.</p>
|
Authentication to work properly.</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1255,7 +1255,7 @@ kubectl create secret generic tls-secret --from-file<span class="o">=</span>tls.
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>Note: The CA Certificate must contain the trusted certificate authority chain to verify client certificates.</p>
|
<p>Note: The CA Certificate must contain the trusted certificate authority chain to verify client certificates.</p>
|
||||||
<h2 id="setup-instructions">Setup Instructions<a class="headerlink" href="#setup-instructions" title="Permanent link">¶</a></h2>
|
<h2 id="setup-instructions">Setup Instructions<a class="headerlink" href="#setup-instructions" title="Permanent link"> ¶</a></h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Add the annotations as provided in the <a href="ingress.yaml">ingress.yaml</a> example to your own ingress resources as required.</li>
|
<li>Add the annotations as provided in the <a href="ingress.yaml">ingress.yaml</a> example to your own ingress resources as required.</li>
|
||||||
<li>Test by performing a curl against the Ingress Path without the Client Cert and expect a Status Code 400.</li>
|
<li>Test by performing a curl against the Ingress Path without the Client Cert and expect a Status Code 400.</li>
|
||||||
|
|
|
@ -1195,8 +1195,8 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/external-auth/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/external-auth/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="external-basic-authentication">External Basic Authentication<a class="headerlink" href="#external-basic-authentication" title="Permanent link">¶</a></h1>
|
<h1 id="external-basic-authentication">External Basic Authentication<a class="headerlink" href="#external-basic-authentication" title="Permanent link"> ¶</a></h1>
|
||||||
<h3 id="example-1">Example 1:<a class="headerlink" href="#example-1" title="Permanent link">¶</a></h3>
|
<h3 id="example-1">Example 1:<a class="headerlink" href="#example-1" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Use an external service (Basic Auth) located in <code class="codehilite">https://httpbin.org</code> </p>
|
<p>Use an external service (Basic Auth) located in <code class="codehilite">https://httpbin.org</code> </p>
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl create -f ingress.yaml
|
<div class="codehilite"><pre><span></span>$ kubectl create -f ingress.yaml
|
||||||
ingress <span class="s2">"external-auth"</span> created
|
ingress <span class="s2">"external-auth"</span> created
|
||||||
|
|
|
@ -1249,15 +1249,15 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/oauth-external-auth/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/auth/oauth-external-auth/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="external-oauth-authentication">External OAUTH Authentication<a class="headerlink" href="#external-oauth-authentication" title="Permanent link">¶</a></h1>
|
<h1 id="external-oauth-authentication">External OAUTH Authentication<a class="headerlink" href="#external-oauth-authentication" title="Permanent link"> ¶</a></h1>
|
||||||
<h3 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">¶</a></h3>
|
<h3 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link"> ¶</a></h3>
|
||||||
<p>The <code class="codehilite">auth-url</code> and <code class="codehilite">auth-signin</code> annotations allow you to use an external
|
<p>The <code class="codehilite">auth-url</code> and <code class="codehilite">auth-signin</code> annotations allow you to use an external
|
||||||
authentication provider to protect your Ingress resources.</p>
|
authentication provider to protect your Ingress resources.</p>
|
||||||
<div class="admonition important">
|
<div class="admonition important">
|
||||||
<p class="admonition-title">Important</p>
|
<p class="admonition-title">Important</p>
|
||||||
<p>This annotation requires <code class="codehilite">nginx-ingress-controller v0.9.0</code> or greater.)</p>
|
<p>This annotation requires <code class="codehilite">nginx-ingress-controller v0.9.0</code> or greater.)</p>
|
||||||
</div>
|
</div>
|
||||||
<h3 id="key-detail">Key Detail<a class="headerlink" href="#key-detail" title="Permanent link">¶</a></h3>
|
<h3 id="key-detail">Key Detail<a class="headerlink" href="#key-detail" title="Permanent link"> ¶</a></h3>
|
||||||
<p>This functionality is enabled by deploying multiple Ingress objects for a single host.
|
<p>This functionality is enabled by deploying multiple Ingress objects for a single host.
|
||||||
One Ingress object has no special annotations and handles authentication.</p>
|
One Ingress object has no special annotations and handles authentication.</p>
|
||||||
<p>Other Ingress objects can then be annotated in such a way that require the user to
|
<p>Other Ingress objects can then be annotated in such a way that require the user to
|
||||||
|
@ -1273,10 +1273,10 @@ same endpoint.</p>
|
||||||
<span class="nn">...</span>
|
<span class="nn">...</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="example-oauth2-proxy-kubernetes-dashboard">Example: OAuth2 Proxy + Kubernetes-Dashboard<a class="headerlink" href="#example-oauth2-proxy-kubernetes-dashboard" title="Permanent link">¶</a></h3>
|
<h3 id="example-oauth2-proxy-kubernetes-dashboard">Example: OAuth2 Proxy + Kubernetes-Dashboard<a class="headerlink" href="#example-oauth2-proxy-kubernetes-dashboard" title="Permanent link"> ¶</a></h3>
|
||||||
<p>This example will show you how to deploy <a href="https://github.com/pusher/oauth2_proxy"><code class="codehilite">oauth2_proxy</code></a>
|
<p>This example will show you how to deploy <a href="https://github.com/pusher/oauth2_proxy"><code class="codehilite">oauth2_proxy</code></a>
|
||||||
into a Kubernetes cluster and use it to protect the Kubernetes Dashboard using github as oAuth2 provider</p>
|
into a Kubernetes cluster and use it to protect the Kubernetes Dashboard using github as oAuth2 provider</p>
|
||||||
<h4 id="prepare">Prepare<a class="headerlink" href="#prepare" title="Permanent link">¶</a></h4>
|
<h4 id="prepare">Prepare<a class="headerlink" href="#prepare" title="Permanent link"> ¶</a></h4>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Install the kubernetes dashboard</li>
|
<li>Install the kubernetes dashboard</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
@ -1209,13 +1209,13 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/configuration-snippets/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/configuration-snippets/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="configuration-snippets">Configuration Snippets<a class="headerlink" href="#configuration-snippets" title="Permanent link">¶</a></h1>
|
<h1 id="configuration-snippets">Configuration Snippets<a class="headerlink" href="#configuration-snippets" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="ingress">Ingress<a class="headerlink" href="#ingress" title="Permanent link">¶</a></h2>
|
<h2 id="ingress">Ingress<a class="headerlink" href="#ingress" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The Ingress in this example adds a custom header to Nginx configuration that only applies to that specific Ingress. If you want to add headers that apply globally to all Ingresses, please have a look at <a href="../custom-headers/">this example</a>.</p>
|
<p>The Ingress in this example adds a custom header to Nginx configuration that only applies to that specific Ingress. If you want to add headers that apply globally to all Ingresses, please have a look at <a href="../custom-headers/">this example</a>.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl apply -f ingress.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl apply -f ingress.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Check if the contents of the annotation are present in the nginx.conf file using:
|
<p>Check if the contents of the annotation are present in the nginx.conf file using:
|
||||||
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf</code></p>
|
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf</code></p>
|
||||||
|
|
||||||
|
|
|
@ -1150,7 +1150,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-configuration/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-configuration/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="custom-configuration">Custom Configuration<a class="headerlink" href="#custom-configuration" title="Permanent link">¶</a></h1>
|
<h1 id="custom-configuration">Custom Configuration<a class="headerlink" href="#custom-configuration" title="Permanent link"> ¶</a></h1>
|
||||||
<p>Using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> is possible to customize the NGINX configuration</p>
|
<p>Using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> is possible to customize the NGINX configuration</p>
|
||||||
<p>For example, if we want to change the timeouts we need to create a ConfigMap:</p>
|
<p>For example, if we want to change the timeouts we need to create a ConfigMap:</p>
|
||||||
<div class="codehilite"><pre><span></span>$ cat configmap.yaml
|
<div class="codehilite"><pre><span></span>$ cat configmap.yaml
|
||||||
|
|
|
@ -1223,9 +1223,9 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-errors/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-errors/README.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>This example demonstrates how to use a custom backend to render custom error pages.</p>
|
<p>This example demonstrates how to use a custom backend to render custom error pages.</p>
|
||||||
<h2 id="customized-default-backend">Customized default backend<a class="headerlink" href="#customized-default-backend" title="Permanent link">¶</a></h2>
|
<h2 id="customized-default-backend">Customized default backend<a class="headerlink" href="#customized-default-backend" title="Permanent link"> ¶</a></h2>
|
||||||
<p>First, create the custom <code class="codehilite">default-backend</code>. It will be used by the Ingress controller later on.</p>
|
<p>First, create the custom <code class="codehilite">default-backend</code>. It will be used by the Ingress controller later on.</p>
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl create -f custom-default-backend.yaml
|
<div class="codehilite"><pre><span></span>$ kubectl create -f custom-default-backend.yaml
|
||||||
service <span class="s2">"nginx-errors"</span> created
|
service <span class="s2">"nginx-errors"</span> created
|
||||||
|
@ -1241,7 +1241,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT<span class="o"
|
||||||
service/nginx-errors ClusterIP <span class="m">10</span>.0.0.12 <none> <span class="m">80</span>/TCP 10s
|
service/nginx-errors ClusterIP <span class="m">10</span>.0.0.12 <none> <span class="m">80</span>/TCP 10s
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="ingress-controller-configuration">Ingress controller configuration<a class="headerlink" href="#ingress-controller-configuration" title="Permanent link">¶</a></h2>
|
<h2 id="ingress-controller-configuration">Ingress controller configuration<a class="headerlink" href="#ingress-controller-configuration" title="Permanent link"> ¶</a></h2>
|
||||||
<p>If you do not already have an instance of the NGINX Ingress controller running, deploy it according to the
|
<p>If you do not already have an instance of the NGINX Ingress controller running, deploy it according to the
|
||||||
<a href="../../../deploy/">deployment guide</a>, then follow these steps:</p>
|
<a href="../../../deploy/">deployment guide</a>, then follow these steps:</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1265,7 +1265,7 @@ ingress-nginx ClusterIP <span class="m">10</span>.0.0.13 <none>
|
||||||
<p>The <code class="codehilite">ingress-nginx</code> Service is of type <code class="codehilite">ClusterIP</code> in this example. This may vary depending on your environment.
|
<p>The <code class="codehilite">ingress-nginx</code> Service is of type <code class="codehilite">ClusterIP</code> in this example. This may vary depending on your environment.
|
||||||
Make sure you can use the Service to reach NGINX before proceeding with the rest of this example.</p>
|
Make sure you can use the Service to reach NGINX before proceeding with the rest of this example.</p>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="testing-error-pages">Testing error pages<a class="headerlink" href="#testing-error-pages" title="Permanent link">¶</a></h2>
|
<h2 id="testing-error-pages">Testing error pages<a class="headerlink" href="#testing-error-pages" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Let us send a couple of HTTP requests using cURL and validate everything is working as expected.</p>
|
<p>Let us send a couple of HTTP requests using cURL and validate everything is working as expected.</p>
|
||||||
<p>A request to the default backend returns a 404 error with a custom message:</p>
|
<p>A request to the default backend returns a 404 error with a custom message:</p>
|
||||||
<div class="codehilite"><pre><span></span>$ curl -D- http://10.0.0.13/
|
<div class="codehilite"><pre><span></span>$ curl -D- http://10.0.0.13/
|
||||||
|
|
|
@ -1195,7 +1195,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-headers/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/custom-headers/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="custom-headers">Custom Headers<a class="headerlink" href="#custom-headers" title="Permanent link">¶</a></h1>
|
<h1 id="custom-headers">Custom Headers<a class="headerlink" href="#custom-headers" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates configuration of the nginx ingress controller via
|
<p>This example demonstrates configuration of the nginx ingress controller via
|
||||||
a ConfigMap to pass a custom list of headers to the upstream
|
a ConfigMap to pass a custom list of headers to the upstream
|
||||||
server.</p>
|
server.</p>
|
||||||
|
@ -1208,7 +1208,7 @@ server.</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>The nginx ingress controller will read the <code class="codehilite">ingress-nginx/nginx-configuration</code> ConfigMap, find the <code class="codehilite">proxy-set-headers</code> key, read HTTP headers from the <code class="codehilite">ingress-nginx/custom-headers</code> ConfigMap, and include those HTTP headers in all requests flowing from nginx to the backends.</p>
|
<p>The nginx ingress controller will read the <code class="codehilite">ingress-nginx/nginx-configuration</code> ConfigMap, find the <code class="codehilite">proxy-set-headers</code> key, read HTTP headers from the <code class="codehilite">ingress-nginx/custom-headers</code> ConfigMap, and include those HTTP headers in all requests flowing from nginx to the backends.</p>
|
||||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Check the contents of the ConfigMaps are present in the nginx.conf file using:
|
<p>Check the contents of the ConfigMaps are present in the nginx.conf file using:
|
||||||
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n ingress-nginx cat /etc/nginx/nginx.conf</code></p>
|
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n ingress-nginx cat /etc/nginx/nginx.conf</code></p>
|
||||||
|
|
||||||
|
|
|
@ -1150,7 +1150,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/external-auth-headers/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/external-auth-headers/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="external-authentication-authentication-service-response-headers-propagation">External authentication, authentication service response headers propagation<a class="headerlink" href="#external-authentication-authentication-service-response-headers-propagation" title="Permanent link">¶</a></h1>
|
<h1 id="external-authentication-authentication-service-response-headers-propagation">External authentication, authentication service response headers propagation<a class="headerlink" href="#external-authentication-authentication-service-response-headers-propagation" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates propagation of selected authentication service response headers
|
<p>This example demonstrates propagation of selected authentication service response headers
|
||||||
to backend service.</p>
|
to backend service.</p>
|
||||||
<p>Sample configuration includes:</p>
|
<p>Sample configuration includes:</p>
|
||||||
|
|
|
@ -1223,11 +1223,11 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/ssl-dh-param/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/ssl-dh-param/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="custom-dh-parameters-for-perfect-forward-secrecy">Custom DH parameters for perfect forward secrecy<a class="headerlink" href="#custom-dh-parameters-for-perfect-forward-secrecy" title="Permanent link">¶</a></h1>
|
<h1 id="custom-dh-parameters-for-perfect-forward-secrecy">Custom DH parameters for perfect forward secrecy<a class="headerlink" href="#custom-dh-parameters-for-perfect-forward-secrecy" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example aims to demonstrate the deployment of an nginx ingress controller and
|
<p>This example aims to demonstrate the deployment of an nginx ingress controller and
|
||||||
use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
||||||
"Perfect Forward Secrecy".</p>
|
"Perfect Forward Secrecy".</p>
|
||||||
<h2 id="custom-configuration">Custom configuration<a class="headerlink" href="#custom-configuration" title="Permanent link">¶</a></h2>
|
<h2 id="custom-configuration">Custom configuration<a class="headerlink" href="#custom-configuration" title="Permanent link"> ¶</a></h2>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> cat configmap.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> cat configmap.yaml
|
||||||
<span class="go">apiVersion: v1</span>
|
<span class="go">apiVersion: v1</span>
|
||||||
<span class="go">data:</span>
|
<span class="go">data:</span>
|
||||||
|
@ -1244,7 +1244,7 @@ use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f configmap.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f configmap.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="custom-dh-parameters-secret">Custom DH parameters secret<a class="headerlink" href="#custom-dh-parameters-secret" title="Permanent link">¶</a></h2>
|
<h2 id="custom-dh-parameters-secret">Custom DH parameters secret<a class="headerlink" href="#custom-dh-parameters-secret" title="Permanent link"> ¶</a></h2>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span>> openssl dhparam <span class="m">1024</span> <span class="m">2</span>> /dev/null <span class="p">|</span> base64
|
<div class="codehilite"><pre><span></span><span class="gp">$</span>> openssl dhparam <span class="m">1024</span> <span class="m">2</span>> /dev/null <span class="p">|</span> base64
|
||||||
<span class="go">LS0tLS1CRUdJTiBESCBQQVJBTUVURVJ...</span>
|
<span class="go">LS0tLS1CRUdJTiBESCBQQVJBTUVURVJ...</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1265,7 +1265,7 @@ use a ConfigMap to configure custom Diffie-Hellman parameters file to help with
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f ssl-dh-param.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f ssl-dh-param.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">¶</a></h2>
|
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Check the contents of the configmap is present in the nginx.conf file using:
|
<p>Check the contents of the configmap is present in the nginx.conf file using:
|
||||||
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf</code></p>
|
<code class="codehilite">kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf</code></p>
|
||||||
|
|
||||||
|
|
|
@ -1150,7 +1150,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/sysctl/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/customization/sysctl/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="sysctl-tuning">Sysctl tuning<a class="headerlink" href="#sysctl-tuning" title="Permanent link">¶</a></h1>
|
<h1 id="sysctl-tuning">Sysctl tuning<a class="headerlink" href="#sysctl-tuning" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example aims to demonstrate the use of an Init Container to adjust sysctl default values
|
<p>This example aims to demonstrate the use of an Init Container to adjust sysctl default values
|
||||||
using <code class="codehilite">kubectl patch</code></p>
|
using <code class="codehilite">kubectl patch</code></p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"</span>
|
||||||
|
|
|
@ -1247,9 +1247,9 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/docker-registry/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/docker-registry/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="docker-registry">Docker registry<a class="headerlink" href="#docker-registry" title="Permanent link">¶</a></h1>
|
<h1 id="docker-registry">Docker registry<a class="headerlink" href="#docker-registry" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to deploy a <a href="https://github.com/docker/distribution">docker registry</a> in the cluster and configure Ingress enable access from Internet</p>
|
<p>This example demonstrates how to deploy a <a href="https://github.com/docker/distribution">docker registry</a> in the cluster and configure Ingress enable access from Internet</p>
|
||||||
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">¶</a></h2>
|
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link"> ¶</a></h2>
|
||||||
<p>First we deploy the docker registry in the cluster:</p>
|
<p>First we deploy the docker registry in the cluster:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/deployment.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/deployment.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1260,7 +1260,7 @@
|
||||||
<p>This deployment uses <code class="codehilite">emptyDir</code> in the <code class="codehilite">volumeMount</code> which means the contents of the registry will be deleted when the pod dies.</p>
|
<p>This deployment uses <code class="codehilite">emptyDir</code> in the <code class="codehilite">volumeMount</code> which means the contents of the registry will be deleted when the pod dies.</p>
|
||||||
</div>
|
</div>
|
||||||
<p>The next required step is creation of the ingress rules. To do this we have two options: with and without TLS</p>
|
<p>The next required step is creation of the ingress rules. To do this we have two options: with and without TLS</p>
|
||||||
<h3 id="without-tls">Without TLS<a class="headerlink" href="#without-tls" title="Permanent link">¶</a></h3>
|
<h3 id="without-tls">Without TLS<a class="headerlink" href="#without-tls" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Download and edit the yaml deployment replacing <code class="codehilite">registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p>
|
<p>Download and edit the yaml deployment replacing <code class="codehilite">registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/ingress-without-tls.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/ingress-without-tls.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1270,13 +1270,13 @@
|
||||||
</div>
|
</div>
|
||||||
<p>Running a docker registry without TLS requires we configure our local docker daemon with the insecure registry flag.</p>
|
<p>Running a docker registry without TLS requires we configure our local docker daemon with the insecure registry flag.</p>
|
||||||
<p>Please check <a href="https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry">deploy a plain http registry</a></p>
|
<p>Please check <a href="https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry">deploy a plain http registry</a></p>
|
||||||
<h3 id="with-tls">With TLS<a class="headerlink" href="#with-tls" title="Permanent link">¶</a></h3>
|
<h3 id="with-tls">With TLS<a class="headerlink" href="#with-tls" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Download and edit the yaml deployment replacing <code class="codehilite">registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p>
|
<p>Download and edit the yaml deployment replacing <code class="codehilite">registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/ingress-with-tls.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/docker-registry/ingress-with-tls.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Deploy <a href="https://github.com/jetstack/kube-lego">kube lego</a> use <a href="https://letsencrypt.org/">Let's Encrypt</a> certificates or edit the ingress rule to use a secret with an existing SSL certificate.</p>
|
<p>Deploy <a href="https://github.com/jetstack/kube-lego">kube lego</a> use <a href="https://letsencrypt.org/">Let's Encrypt</a> certificates or edit the ingress rule to use a secret with an existing SSL certificate.</p>
|
||||||
<h3 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link">¶</a></h3>
|
<h3 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link"> ¶</a></h3>
|
||||||
<p>To test the registry is working correctly we download a known image from <a href="https://hub.docker.com">docker hub</a>, create a tag pointing to the new registry and upload the image:</p>
|
<p>To test the registry is working correctly we download a known image from <a href="https://hub.docker.com">docker hub</a>, create a tag pointing to the new registry and upload the image:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">docker pull ubuntu:16.04</span>
|
<div class="codehilite"><pre><span></span><span class="go">docker pull ubuntu:16.04</span>
|
||||||
<span class="go">docker tag ubuntu:16.04 `registry.<your domain>/ubuntu:16.04`</span>
|
<span class="go">docker tag ubuntu:16.04 `registry.<your domain>/ubuntu:16.04`</span>
|
||||||
|
|
|
@ -1289,10 +1289,10 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/grpc/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/grpc/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="grpc">gRPC<a class="headerlink" href="#grpc" title="Permanent link">¶</a></h1>
|
<h1 id="grpc">gRPC<a class="headerlink" href="#grpc" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to route traffic to a gRPC service through the
|
<p>This example demonstrates how to route traffic to a gRPC service through the
|
||||||
nginx controller.</p>
|
nginx controller.</p>
|
||||||
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h2>
|
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link"> ¶</a></h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li>You have a kubernetes cluster running.</li>
|
<li>You have a kubernetes cluster running.</li>
|
||||||
<li>You have a domain name such as <code class="codehilite">example.com</code> that is configured to route
|
<li>You have a domain name such as <code class="codehilite">example.com</code> that is configured to route
|
||||||
|
@ -1309,7 +1309,7 @@ nginx controller.</p>
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/tree/master/images/grpc-fortune-teller">fortune-teller</a>
|
<a href="https://github.com/kubernetes/ingress-nginx/tree/master/images/grpc-fortune-teller">fortune-teller</a>
|
||||||
application provided here as an example. </li>
|
application provided here as an example. </li>
|
||||||
</ol>
|
</ol>
|
||||||
<h3 id="step-1-kubernetes-deployment">Step 1: kubernetes <code class="codehilite">Deployment</code><a class="headerlink" href="#step-1-kubernetes-deployment" title="Permanent link">¶</a></h3>
|
<h3 id="step-1-kubernetes-deployment">Step 1: kubernetes <code class="codehilite">Deployment</code><a class="headerlink" href="#step-1-kubernetes-deployment" title="Permanent link"> ¶</a></h3>
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl create -f app.yaml
|
<div class="codehilite"><pre><span></span>$ kubectl create -f app.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
|
@ -1332,13 +1332,13 @@ inside the cluster and arrive "insecure").</p>
|
||||||
<p>For your own application you may or may not want to do this. If you prefer to
|
<p>For your own application you may or may not want to do this. If you prefer to
|
||||||
forward encrypted traffic to your POD and terminate TLS at the gRPC server
|
forward encrypted traffic to your POD and terminate TLS at the gRPC server
|
||||||
itself, add the ingress annotation <code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol: "GRPCS"</code>.</p>
|
itself, add the ingress annotation <code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol: "GRPCS"</code>.</p>
|
||||||
<h3 id="step-2-the-kubernetes-service">Step 2: the kubernetes <code class="codehilite">Service</code><a class="headerlink" href="#step-2-the-kubernetes-service" title="Permanent link">¶</a></h3>
|
<h3 id="step-2-the-kubernetes-service">Step 2: the kubernetes <code class="codehilite">Service</code><a class="headerlink" href="#step-2-the-kubernetes-service" title="Permanent link"> ¶</a></h3>
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl create -f svc.yaml
|
<div class="codehilite"><pre><span></span>$ kubectl create -f svc.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Here we have a typical service. Nothing special, just routing traffic to the
|
<p>Here we have a typical service. Nothing special, just routing traffic to the
|
||||||
backend application on port <code class="codehilite">50051</code>.</p>
|
backend application on port <code class="codehilite">50051</code>.</p>
|
||||||
<h3 id="step-3-the-kubernetes-ingress">Step 3: the kubernetes <code class="codehilite">Ingress</code><a class="headerlink" href="#step-3-the-kubernetes-ingress" title="Permanent link">¶</a></h3>
|
<h3 id="step-3-the-kubernetes-ingress">Step 3: the kubernetes <code class="codehilite">Ingress</code><a class="headerlink" href="#step-3-the-kubernetes-ingress" title="Permanent link"> ¶</a></h3>
|
||||||
<div class="codehilite"><pre><span></span>$ kubectl create -f ingress.yaml
|
<div class="codehilite"><pre><span></span>$ kubectl create -f ingress.yaml
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
|
@ -1353,7 +1353,7 @@ backend application on port <code class="codehilite">50051</code>.</p>
|
||||||
<code class="codehilite">https://fortune-teller.stack.build:443</code> and routes unencrypted messages to
|
<code class="codehilite">https://fortune-teller.stack.build:443</code> and routes unencrypted messages to
|
||||||
our kubernetes service.</li>
|
our kubernetes service.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<h3 id="step-4-test-the-connection">Step 4: test the connection<a class="headerlink" href="#step-4-test-the-connection" title="Permanent link">¶</a></h3>
|
<h3 id="step-4-test-the-connection">Step 4: test the connection<a class="headerlink" href="#step-4-test-the-connection" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Once we've applied our configuration to kubernetes, it's time to test that we
|
<p>Once we've applied our configuration to kubernetes, it's time to test that we
|
||||||
can actually talk to the backend. To do this, we'll use the
|
can actually talk to the backend. To do this, we'll use the
|
||||||
<a href="https://github.com/fullstorydev/grpcurl">grpcurl</a> utility:</p>
|
<a href="https://github.com/fullstorydev/grpcurl">grpcurl</a> utility:</p>
|
||||||
|
@ -1363,7 +1363,7 @@ can actually talk to the backend. To do this, we'll use the
|
||||||
<span class="o">}</span>
|
<span class="o">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="debugging-hints">Debugging Hints<a class="headerlink" href="#debugging-hints" title="Permanent link">¶</a></h3>
|
<h3 id="debugging-hints">Debugging Hints<a class="headerlink" href="#debugging-hints" title="Permanent link"> ¶</a></h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Obviously, watch the logs on your app.</li>
|
<li>Obviously, watch the logs on your app.</li>
|
||||||
<li>Watch the logs for the nginx-ingress-controller (increasing verbosity as
|
<li>Watch the logs for the nginx-ingress-controller (increasing verbosity as
|
||||||
|
@ -1379,7 +1379,7 @@ https://proto.stack.build, a protocol buffer / gRPC build service that can use
|
||||||
to help make it easier for your users to consume your API.</p>
|
to help make it easier for your users to consume your API.</p>
|
||||||
<p>See also the specific GRPC settings of NGINX: https://nginx.org/en/docs/http/ngx_http_grpc_module.html</p>
|
<p>See also the specific GRPC settings of NGINX: https://nginx.org/en/docs/http/ngx_http_grpc_module.html</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h3 id="notes-on-using-responserequest-streams">Notes on using response/request streams<a class="headerlink" href="#notes-on-using-responserequest-streams" title="Permanent link">¶</a></h3>
|
<h3 id="notes-on-using-responserequest-streams">Notes on using response/request streams<a class="headerlink" href="#notes-on-using-responserequest-streams" title="Permanent link"> ¶</a></h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li>If your server does only response streaming and you expect a stream to be open longer than 60 seconds, you will have to change the <code class="codehilite">grpc_read_timeout</code> to acommodate for this.</li>
|
<li>If your server does only response streaming and you expect a stream to be open longer than 60 seconds, you will have to change the <code class="codehilite">grpc_read_timeout</code> to acommodate for this.</li>
|
||||||
<li>If your service does only request streaming and you expect a stream to be open longer than 60 seconds, you have to change the
|
<li>If your service does only request streaming and you expect a stream to be open longer than 60 seconds, you have to change the
|
||||||
|
|
|
@ -1148,7 +1148,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="ingress-examples">Ingress examples<a class="headerlink" href="#ingress-examples" title="Permanent link">¶</a></h1>
|
<h1 id="ingress-examples">Ingress examples<a class="headerlink" href="#ingress-examples" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This directory contains a catalog of examples on how to run, configure and scale Ingress.<br />
|
<p>This directory contains a catalog of examples on how to run, configure and scale Ingress.<br />
|
||||||
Please review the <a href="PREREQUISITES/">prerequisites</a> before trying them.</p>
|
Please review the <a href="PREREQUISITES/">prerequisites</a> before trying them.</p>
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -1148,7 +1148,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/multi-tls/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/multi-tls/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="multi-tls-certificate-termination">Multi TLS certificate termination<a class="headerlink" href="#multi-tls-certificate-termination" title="Permanent link">¶</a></h1>
|
<h1 id="multi-tls-certificate-termination">Multi TLS certificate termination<a class="headerlink" href="#multi-tls-certificate-termination" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example uses 2 different certificates to terminate SSL for 2 hostnames.</p>
|
<p>This example uses 2 different certificates to terminate SSL for 2 hostnames.</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Deploy the controller by creating the rc in the parent dir</li>
|
<li>Deploy the controller by creating the rc in the parent dir</li>
|
||||||
|
|
|
@ -1148,7 +1148,7 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/psp/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/psp/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="pod-security-policy-psp">Pod Security Policy (PSP)<a class="headerlink" href="#pod-security-policy-psp" title="Permanent link">¶</a></h1>
|
<h1 id="pod-security-policy-psp">Pod Security Policy (PSP)<a class="headerlink" href="#pod-security-policy-psp" title="Permanent link"> ¶</a></h1>
|
||||||
<p>In most clusters today, by default, all resources (e.g. Deployments and ReplicatSets)
|
<p>In most clusters today, by default, all resources (e.g. Deployments and ReplicatSets)
|
||||||
have permissions to create pods.
|
have permissions to create pods.
|
||||||
Kubernetes however provides a more fine-grained authorization policy called
|
Kubernetes however provides a more fine-grained authorization policy called
|
||||||
|
|
|
@ -1261,13 +1261,13 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/rewrite/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/rewrite/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="rewrite">Rewrite<a class="headerlink" href="#rewrite" title="Permanent link">¶</a></h1>
|
<h1 id="rewrite">Rewrite<a class="headerlink" href="#rewrite" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to use the Rewrite annotations</p>
|
<p>This example demonstrates how to use the Rewrite annotations</p>
|
||||||
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h2>
|
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You will need to make sure your Ingress targets exactly one Ingress
|
<p>You will need to make sure your Ingress targets exactly one Ingress
|
||||||
controller by specifying the <a href="../../user-guide/multiple-ingress/">ingress.class annotation</a>,
|
controller by specifying the <a href="../../user-guide/multiple-ingress/">ingress.class annotation</a>,
|
||||||
and that you have an ingress controller <a href="../../deploy">running</a> in your cluster.</p>
|
and that you have an ingress controller <a href="../../deploy/">running</a> in your cluster.</p>
|
||||||
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">¶</a></h2>
|
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Rewriting can be controlled using the following annotations:</p>
|
<p>Rewriting can be controlled using the following annotations:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1305,8 +1305,8 @@ and that you have an ingress controller <a href="../../deploy">running</a> in yo
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<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>
|
||||||
<h3 id="rewrite-target">Rewrite Target<a class="headerlink" href="#rewrite-target" title="Permanent link">¶</a></h3>
|
<h3 id="rewrite-target">Rewrite Target<a class="headerlink" href="#rewrite-target" title="Permanent link"> ¶</a></h3>
|
||||||
<div class="admonition attention">
|
<div class="admonition attention">
|
||||||
<p class="admonition-title">Attention</p>
|
<p class="admonition-title">Attention</p>
|
||||||
<p>Starting in Version 0.22.0, ingress definitions using the annotation <code class="codehilite">nginx.ingress.kubernetes.io/rewrite-target</code> are not backwards compatible with previous versions. In Version 0.22.0 and beyond, any substrings within the request URI that need to be passed to the rewritten path must explicitly be defined in a <a href="https://www.regular-expressions.info/refcapture.html">capture group</a>.</p>
|
<p>Starting in Version 0.22.0, ingress definitions using the annotation <code class="codehilite">nginx.ingress.kubernetes.io/rewrite-target</code> are not backwards compatible with previous versions. In Version 0.22.0 and beyond, any substrings within the request URI that need to be passed to the rewritten path must explicitly be defined in a <a href="https://www.regular-expressions.info/refcapture.html">capture group</a>.</p>
|
||||||
|
@ -1341,7 +1341,7 @@ and that you have an ingress controller <a href="../../deploy">running</a> in yo
|
||||||
- <code class="codehilite">rewrite.bar.com/something</code> rewrites to <code class="codehilite">rewrite.bar.com/</code>
|
- <code class="codehilite">rewrite.bar.com/something</code> rewrites to <code class="codehilite">rewrite.bar.com/</code>
|
||||||
- <code class="codehilite">rewrite.bar.com/something/</code> rewrites to <code class="codehilite">rewrite.bar.com/</code>
|
- <code class="codehilite">rewrite.bar.com/something/</code> rewrites to <code class="codehilite">rewrite.bar.com/</code>
|
||||||
- <code class="codehilite">rewrite.bar.com/something/new</code> rewrites to <code class="codehilite">rewrite.bar.com/new</code></p>
|
- <code class="codehilite">rewrite.bar.com/something/new</code> rewrites to <code class="codehilite">rewrite.bar.com/new</code></p>
|
||||||
<h3 id="app-root">App Root<a class="headerlink" href="#app-root" title="Permanent link">¶</a></h3>
|
<h3 id="app-root">App Root<a class="headerlink" href="#app-root" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Create an Ingress rule with a app-root annotation:
|
<p>Create an Ingress rule with a app-root annotation:
|
||||||
<div class="codehilite"><pre><span></span>$ <span class="nb">echo</span> <span class="s2">"</span>
|
<div class="codehilite"><pre><span></span>$ <span class="nb">echo</span> <span class="s2">"</span>
|
||||||
<span class="s2">apiVersion: extensions/v1beta1</span>
|
<span class="s2">apiVersion: extensions/v1beta1</span>
|
||||||
|
|
|
@ -1249,14 +1249,14 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/static-ip/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/static-ip/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="static-ips">Static IPs<a class="headerlink" href="#static-ips" title="Permanent link">¶</a></h1>
|
<h1 id="static-ips">Static IPs<a class="headerlink" href="#static-ips" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to assign a static-ip to an Ingress on through the Nginx controller.</p>
|
<p>This example demonstrates how to assign a static-ip to an Ingress on through the Nginx controller.</p>
|
||||||
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h2>
|
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You need a <a href="../PREREQUISITES/#tls-certificates">TLS cert</a> and a <a href="../PREREQUISITES/#test-http-service">test HTTP service</a> for this example.
|
<p>You need a <a href="../PREREQUISITES/#tls-certificates">TLS cert</a> and a <a href="../PREREQUISITES/#test-http-service">test HTTP service</a> for this example.
|
||||||
You will also need to make sure your Ingress targets exactly one Ingress
|
You will also need to make sure your Ingress targets exactly one Ingress
|
||||||
controller by specifying the <a href="../../user-guide/multiple-ingress/">ingress.class annotation</a>,
|
controller by specifying the <a href="../../user-guide/multiple-ingress/">ingress.class annotation</a>,
|
||||||
and that you have an ingress controller <a href="../../deploy">running</a> in your cluster.</p>
|
and that you have an ingress controller <a href="../../deploy/">running</a> in your cluster.</p>
|
||||||
<h2 id="acquiring-an-ip">Acquiring an IP<a class="headerlink" href="#acquiring-an-ip" title="Permanent link">¶</a></h2>
|
<h2 id="acquiring-an-ip">Acquiring an IP<a class="headerlink" href="#acquiring-an-ip" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Since instances of the nginx controller actually run on nodes in your cluster,
|
<p>Since instances of the nginx controller actually run on nodes in your cluster,
|
||||||
by default nginx Ingresses will only get static IPs if your cloudprovider
|
by default nginx Ingresses will only get static IPs if your cloudprovider
|
||||||
supports static IP assignments to nodes. On GKE/GCE for example, even though
|
supports static IP assignments to nodes. On GKE/GCE for example, even though
|
||||||
|
@ -1279,7 +1279,7 @@ already has it set to "nginx-ingress-lb").</p>
|
||||||
<span class="go">deployment "nginx-ingress-controller" created</span>
|
<span class="go">deployment "nginx-ingress-controller" created</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="assigning-the-ip-to-an-ingress">Assigning the IP to an Ingress<a class="headerlink" href="#assigning-the-ip-to-an-ingress" title="Permanent link">¶</a></h2>
|
<h2 id="assigning-the-ip-to-an-ingress">Assigning the IP to an Ingress<a class="headerlink" href="#assigning-the-ip-to-an-ingress" title="Permanent link"> ¶</a></h2>
|
||||||
<p>From here on every Ingress created with the <code class="codehilite">ingress.class</code> annotation set to
|
<p>From here on every Ingress created with the <code class="codehilite">ingress.class</code> annotation set to
|
||||||
<code class="codehilite">nginx</code> will get the IP allocated in the previous step</p>
|
<code class="codehilite">nginx</code> will get the IP allocated in the previous step</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress.yaml
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress.yaml
|
||||||
|
@ -1300,7 +1300,7 @@ already has it set to "nginx-ingress-lb").</p>
|
||||||
<span class="go">...</span>
|
<span class="go">...</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="retaining-the-ip">Retaining the IP<a class="headerlink" href="#retaining-the-ip" title="Permanent link">¶</a></h2>
|
<h2 id="retaining-the-ip">Retaining the IP<a class="headerlink" href="#retaining-the-ip" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You can test retention by deleting the Ingress</p>
|
<p>You can test retention by deleting the Ingress</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl delete ing nginx-ingress
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl delete ing nginx-ingress
|
||||||
<span class="go">ingress "nginx-ingress" deleted</span>
|
<span class="go">ingress "nginx-ingress" deleted</span>
|
||||||
|
@ -1318,7 +1318,7 @@ already has it set to "nginx-ingress-lb").</p>
|
||||||
Ingresses, because all requests are proxied through the same set of nginx
|
Ingresses, because all requests are proxied through the same set of nginx
|
||||||
controllers.</p>
|
controllers.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2 id="promote-ephemeral-to-static-ip">Promote ephemeral to static IP<a class="headerlink" href="#promote-ephemeral-to-static-ip" title="Permanent link">¶</a></h2>
|
<h2 id="promote-ephemeral-to-static-ip">Promote ephemeral to static IP<a class="headerlink" href="#promote-ephemeral-to-static-ip" title="Permanent link"> ¶</a></h2>
|
||||||
<p>To promote the allocated IP to static, you can update the Service manifest</p>
|
<p>To promote the allocated IP to static, you can update the Service manifest</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl patch svc nginx-ingress-lb -p <span class="s1">'{"spec": {"loadBalancerIP": "104.154.109.191"}}'</span>
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl patch svc nginx-ingress-lb -p <span class="s1">'{"spec": {"loadBalancerIP": "104.154.109.191"}}'</span>
|
||||||
<span class="go">"nginx-ingress-lb" patched</span>
|
<span class="go">"nginx-ingress-lb" patched</span>
|
||||||
|
|
|
@ -1221,11 +1221,11 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/tls-termination/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/tls-termination/README.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="tls-termination">TLS termination<a class="headerlink" href="#tls-termination" title="Permanent link">¶</a></h1>
|
<h1 id="tls-termination">TLS termination<a class="headerlink" href="#tls-termination" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This example demonstrates how to terminate TLS through the nginx Ingress controller.</p>
|
<p>This example demonstrates how to terminate TLS through the nginx Ingress controller.</p>
|
||||||
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h2>
|
<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You need a <a href="../PREREQUISITES/#tls-certificates">TLS cert</a> and a <a href="../PREREQUISITES/#test-http-service">test HTTP service</a> for this example.</p>
|
<p>You need a <a href="../PREREQUISITES/#tls-certificates">TLS cert</a> and a <a href="../PREREQUISITES/#test-http-service">test HTTP service</a> for this example.</p>
|
||||||
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">¶</a></h2>
|
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Create a <code class="codehilite">values.yaml</code> file.</p>
|
<p>Create a <code class="codehilite">values.yaml</code> file.</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>
|
<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>
|
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||||
|
@ -1254,7 +1254,7 @@ TLS cert, and forward un-encrypted HTTP traffic to the test HTTP service.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f ingress.yaml</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply -f ingress.yaml</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link">¶</a></h2>
|
<h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>You can confirm that the Ingress works.</p>
|
<p>You can confirm that the Ingress works.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test
|
||||||
<span class="go">Name: nginx-test</span>
|
<span class="go">Name: nginx-test</span>
|
||||||
|
|
|
@ -1289,16 +1289,16 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/how-it-works.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/how-it-works.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="how-it-works">How it works<a class="headerlink" href="#how-it-works" title="Permanent link">¶</a></h1>
|
<h1 id="how-it-works">How it works<a class="headerlink" href="#how-it-works" title="Permanent link"> ¶</a></h1>
|
||||||
<p>The objective of this document is to explain how the NGINX Ingress controller works, in particular how the NGINX model is built and why we need one.</p>
|
<p>The objective of this document is to explain how the NGINX Ingress controller works, in particular how the NGINX model is built and why we need one.</p>
|
||||||
<h2 id="nginx-configuration">NGINX configuration<a class="headerlink" href="#nginx-configuration" title="Permanent link">¶</a></h2>
|
<h2 id="nginx-configuration">NGINX configuration<a class="headerlink" href="#nginx-configuration" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The goal of this Ingress controller is the assembly of a configuration file (nginx.conf). The main implication of this requirement is the need to reload NGINX after any change in the configuration file. <em>Though it is important to note that we don't reload Nginx on changes that impact only an <code class="codehilite">upstream</code> configuration (i.e Endpoints change when you deploy your app)</em>. We use <a href="https://github.com/openresty/lua-nginx-module">lua-nginx-module</a> to achieve this. Check <a href="#avoiding-reloads-on-endpoints-changes">below</a> to learn more about how it's done.</p>
|
<p>The goal of this Ingress controller is the assembly of a configuration file (nginx.conf). The main implication of this requirement is the need to reload NGINX after any change in the configuration file. <em>Though it is important to note that we don't reload Nginx on changes that impact only an <code class="codehilite">upstream</code> configuration (i.e Endpoints change when you deploy your app)</em>. We use <a href="https://github.com/openresty/lua-nginx-module">lua-nginx-module</a> to achieve this. Check <a href="#avoiding-reloads-on-endpoints-changes">below</a> to learn more about how it's done.</p>
|
||||||
<h2 id="nginx-model">NGINX model<a class="headerlink" href="#nginx-model" title="Permanent link">¶</a></h2>
|
<h2 id="nginx-model">NGINX model<a class="headerlink" href="#nginx-model" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Usually, a Kubernetes Controller utilizes the <a href="https://coreos.com/kubernetes/docs/latest/replication-controller.html#the-reconciliation-loop-in-detail">synchronization loop pattern</a> to check if the desired state in the controller is updated or a change is required. To this purpose, we need to build a model using different objects from the cluster, in particular (in no special order) Ingresses, Services, Endpoints, Secrets, and Configmaps to generate a point in time configuration file that reflects the state of the cluster.</p>
|
<p>Usually, a Kubernetes Controller utilizes the <a href="https://coreos.com/kubernetes/docs/latest/replication-controller.html#the-reconciliation-loop-in-detail">synchronization loop pattern</a> to check if the desired state in the controller is updated or a change is required. To this purpose, we need to build a model using different objects from the cluster, in particular (in no special order) Ingresses, Services, Endpoints, Secrets, and Configmaps to generate a point in time configuration file that reflects the state of the cluster.</p>
|
||||||
<p>To get this object from the cluster, we use <a href="https://godoc.org/k8s.io/client-go/informers#NewFilteredSharedInformerFactory">Kubernetes Informers</a>, in particular, <code class="codehilite">FilteredSharedInformer</code>. This informers allows reacting to changes in using <a href="https://godoc.org/k8s.io/client-go/tools/cache#ResourceEventHandlerFuncs">callbacks</a> to individual changes when a new object is added, modified or removed. Unfortunately, there is no way to know if a particular change is going to affect the final configuration file. Therefore on every change, we have to rebuild a new model from scratch based on the state of cluster and compare it to the current model. If the new model equals to the current one, then we avoid generating a new NGINX configuration and triggering a reload. Otherwise, we check if the difference is only about Endpoints. If so we then send the new list of Endpoints to a Lua handler running inside Nginx using HTTP POST request and again avoid generating a new NGINX configuration and triggering a reload. If the difference between running and new model is about more than just Endpoints we create a new NGINX configuration based on the new model, replace the current model and trigger a reload.</p>
|
<p>To get this object from the cluster, we use <a href="https://godoc.org/k8s.io/client-go/informers#NewFilteredSharedInformerFactory">Kubernetes Informers</a>, in particular, <code class="codehilite">FilteredSharedInformer</code>. This informers allows reacting to changes in using <a href="https://godoc.org/k8s.io/client-go/tools/cache#ResourceEventHandlerFuncs">callbacks</a> to individual changes when a new object is added, modified or removed. Unfortunately, there is no way to know if a particular change is going to affect the final configuration file. Therefore on every change, we have to rebuild a new model from scratch based on the state of cluster and compare it to the current model. If the new model equals to the current one, then we avoid generating a new NGINX configuration and triggering a reload. Otherwise, we check if the difference is only about Endpoints. If so we then send the new list of Endpoints to a Lua handler running inside Nginx using HTTP POST request and again avoid generating a new NGINX configuration and triggering a reload. If the difference between running and new model is about more than just Endpoints we create a new NGINX configuration based on the new model, replace the current model and trigger a reload.</p>
|
||||||
<p>One of the uses of the model is to avoid unnecessary reloads when there's no change in the state and to detect conflicts in definitions.</p>
|
<p>One of the uses of the model is to avoid unnecessary reloads when there's no change in the state and to detect conflicts in definitions.</p>
|
||||||
<p>The final representation of the NGINX configuration is generated from a <a href="https://github.com/kubernetes/ingress-nginx/blob/master/rootfs/etc/nginx/template/nginx.tmpl">Go template</a> using the new model as input for the variables required by the template.</p>
|
<p>The final representation of the NGINX configuration is generated from a <a href="https://github.com/kubernetes/ingress-nginx/blob/master/rootfs/etc/nginx/template/nginx.tmpl">Go template</a> using the new model as input for the variables required by the template.</p>
|
||||||
<h2 id="building-the-nginx-model">Building the NGINX model<a class="headerlink" href="#building-the-nginx-model" title="Permanent link">¶</a></h2>
|
<h2 id="building-the-nginx-model">Building the NGINX model<a class="headerlink" href="#building-the-nginx-model" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Building a model is an expensive operation, for this reason, the use of the synchronization loop is a must. By using a <a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/task/queue.go#L38">work queue</a> it is possible to not lose changes and remove the use of <a href="https://golang.org/pkg/sync/#Mutex">sync.Mutex</a> to force a single execution of the sync loop and additionally it is possible to create a time window between the start and end of the sync loop that allows us to discard unnecessary updates. It is important to understand that any change in the cluster could generate events that the informer will send to the controller and one of the reasons for the <a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/task/queue.go#L38">work queue</a>.</p>
|
<p>Building a model is an expensive operation, for this reason, the use of the synchronization loop is a must. By using a <a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/task/queue.go#L38">work queue</a> it is possible to not lose changes and remove the use of <a href="https://golang.org/pkg/sync/#Mutex">sync.Mutex</a> to force a single execution of the sync loop and additionally it is possible to create a time window between the start and end of the sync loop that allows us to discard unnecessary updates. It is important to understand that any change in the cluster could generate events that the informer will send to the controller and one of the reasons for the <a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/task/queue.go#L38">work queue</a>.</p>
|
||||||
<p>Operations to build the model:</p>
|
<p>Operations to build the model:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1320,7 +1320,7 @@
|
||||||
<li>Annotations are applied to all the paths in the Ingress.</li>
|
<li>Annotations are applied to all the paths in the Ingress.</li>
|
||||||
<li>Multiple Ingresses can define different annotations. These definitions are not shared between Ingresses.</li>
|
<li>Multiple Ingresses can define different annotations. These definitions are not shared between Ingresses.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="when-a-reload-is-required">When a reload is required<a class="headerlink" href="#when-a-reload-is-required" title="Permanent link">¶</a></h2>
|
<h2 id="when-a-reload-is-required">When a reload is required<a class="headerlink" href="#when-a-reload-is-required" title="Permanent link"> ¶</a></h2>
|
||||||
<p>The next list describes the scenarios when a reload is required:</p>
|
<p>The next list describes the scenarios when a reload is required:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>New Ingress Resource Created.</li>
|
<li>New Ingress Resource Created.</li>
|
||||||
|
@ -1331,12 +1331,12 @@
|
||||||
<li>Some missing referenced object from the Ingress is available, like a Service or Secret.</li>
|
<li>Some missing referenced object from the Ingress is available, like a Service or Secret.</li>
|
||||||
<li>A Secret is updated.</li>
|
<li>A Secret is updated.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="avoiding-reloads">Avoiding reloads<a class="headerlink" href="#avoiding-reloads" title="Permanent link">¶</a></h2>
|
<h2 id="avoiding-reloads">Avoiding reloads<a class="headerlink" href="#avoiding-reloads" title="Permanent link"> ¶</a></h2>
|
||||||
<p>In some cases, it is possible to avoid reloads, in particular when there is a change in the endpoints, i.e., a pod is started or replaced. It is out of the scope of this Ingress controller to remove reloads completely. This would require an incredible amount of work and at some point makes no sense. This can change only if NGINX changes the way new configurations are read, basically, new changes do not replace worker processes.</p>
|
<p>In some cases, it is possible to avoid reloads, in particular when there is a change in the endpoints, i.e., a pod is started or replaced. It is out of the scope of this Ingress controller to remove reloads completely. This would require an incredible amount of work and at some point makes no sense. This can change only if NGINX changes the way new configurations are read, basically, new changes do not replace worker processes.</p>
|
||||||
<h3 id="avoiding-reloads-on-endpoints-changes">Avoiding reloads on Endpoints changes<a class="headerlink" href="#avoiding-reloads-on-endpoints-changes" title="Permanent link">¶</a></h3>
|
<h3 id="avoiding-reloads-on-endpoints-changes">Avoiding reloads on Endpoints changes<a class="headerlink" href="#avoiding-reloads-on-endpoints-changes" title="Permanent link"> ¶</a></h3>
|
||||||
<p>On every endpoint change the controller fetches endpoints from all the services it sees and generates corresponding Backend objects. It then sends these objects to a Lua handler running inside Nginx. The Lua code in turn stores those backends in a shared memory zone. Then for every request Lua code running in <a href="https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md"><code class="codehilite">balancer_by_lua</code></a> context detects what endpoints it should choose upstream peer from and applies the configured load balancing algorithm to choose the peer. Then Nginx takes care of the rest. This way we avoid reloading Nginx on endpoint changes. <em>Note</em> that this includes annotation changes that affects only <code class="codehilite">upstream</code> configuration in Nginx as well.</p>
|
<p>On every endpoint change the controller fetches endpoints from all the services it sees and generates corresponding Backend objects. It then sends these objects to a Lua handler running inside Nginx. The Lua code in turn stores those backends in a shared memory zone. Then for every request Lua code running in <a href="https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md"><code class="codehilite">balancer_by_lua</code></a> context detects what endpoints it should choose upstream peer from and applies the configured load balancing algorithm to choose the peer. Then Nginx takes care of the rest. This way we avoid reloading Nginx on endpoint changes. <em>Note</em> that this includes annotation changes that affects only <code class="codehilite">upstream</code> configuration in Nginx as well.</p>
|
||||||
<p>In a relatively big clusters with frequently deploying apps this feature saves significant number of Nginx reloads which can otherwise affect response latency, load balancing quality (after every reload Nginx resets the state of load balancing) and so on.</p>
|
<p>In a relatively big clusters with frequently deploying apps this feature saves significant number of Nginx reloads which can otherwise affect response latency, load balancing quality (after every reload Nginx resets the state of load balancing) and so on.</p>
|
||||||
<h3 id="avoiding-outage-from-wrong-configuration">Avoiding outage from wrong configuration<a class="headerlink" href="#avoiding-outage-from-wrong-configuration" title="Permanent link">¶</a></h3>
|
<h3 id="avoiding-outage-from-wrong-configuration">Avoiding outage from wrong configuration<a class="headerlink" href="#avoiding-outage-from-wrong-configuration" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Because the ingress controller works using the <a href="https://coreos.com/kubernetes/docs/latest/replication-controller.html#the-reconciliation-loop-in-detail">synchronization loop pattern</a>, it is applying the configuration for all matching objects. In case some Ingress objects have a broken configuration, for example a syntax error in the <code class="codehilite">nginx.ingress.kubernetes.io/configuration-snippet</code> annotation, the generated configuration becomes invalid, does not reload and hence no more ingresses will be taken into account.</p>
|
<p>Because the ingress controller works using the <a href="https://coreos.com/kubernetes/docs/latest/replication-controller.html#the-reconciliation-loop-in-detail">synchronization loop pattern</a>, it is applying the configuration for all matching objects. In case some Ingress objects have a broken configuration, for example a syntax error in the <code class="codehilite">nginx.ingress.kubernetes.io/configuration-snippet</code> annotation, the generated configuration becomes invalid, does not reload and hence no more ingresses will be taken into account.</p>
|
||||||
<p>To prevent this situation to happen, the nginx ingress controller optionally exposes a <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">validating admission webhook server</a> to ensure the validity of incoming ingress objects.
|
<p>To prevent this situation to happen, the nginx ingress controller optionally exposes a <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook">validating admission webhook server</a> to ensure the validity of incoming ingress objects.
|
||||||
This webhook appends the incoming ingress objects to the list of ingresses, generates the configuration and calls nginx to ensure the configuration has no syntax errors.</p>
|
This webhook appends the incoming ingress objects to the list of ingresses, generates the configuration and calls nginx to ensure the configuration has no syntax errors.</p>
|
||||||
|
|
|
@ -1193,12 +1193,12 @@
|
||||||
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/index.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="welcome">Welcome<a class="headerlink" href="#welcome" title="Permanent link">¶</a></h1>
|
<h1 id="welcome">Welcome<a class="headerlink" href="#welcome" title="Permanent link"> ¶</a></h1>
|
||||||
<p>This is the documentation for the NGINX Ingress Controller.</p>
|
<p>This is the documentation for the NGINX Ingress Controller.</p>
|
||||||
<p>It is built around the <a href="http://kubernetes.io/docs/user-guide/ingress/">Kubernetes Ingress resource</a>, using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#understanding-configmaps-and-pods">ConfigMap</a> to store the NGINX configuration.</p>
|
<p>It is built around the <a href="http://kubernetes.io/docs/user-guide/ingress/">Kubernetes Ingress resource</a>, using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#understanding-configmaps-and-pods">ConfigMap</a> to store the NGINX configuration.</p>
|
||||||
<p>Learn more about using Ingress on <a href="http://kubernetes.io/docs/user-guide/ingress/">k8s.io</a>.</p>
|
<p>Learn more about using Ingress on <a href="http://kubernetes.io/docs/user-guide/ingress/">k8s.io</a>.</p>
|
||||||
<h2 id="getting-started">Getting Started<a class="headerlink" href="#getting-started" title="Permanent link">¶</a></h2>
|
<h2 id="getting-started">Getting Started<a class="headerlink" href="#getting-started" title="Permanent link"> ¶</a></h2>
|
||||||
<p>See <a href="./deploy">Deployment</a> for a whirlwind tour that will get you started.</p>
|
<p>See <a href="./deploy/">Deployment</a> for a whirlwind tour that will get you started.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1381,8 +1381,8 @@ Do not move it without providing redirects.
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<h1 id="the-ingress-nginx-kubectl-plugin">The ingress-nginx kubectl plugin<a class="headerlink" href="#the-ingress-nginx-kubectl-plugin" title="Permanent link">¶</a></h1>
|
<h1 id="the-ingress-nginx-kubectl-plugin">The ingress-nginx kubectl plugin<a class="headerlink" href="#the-ingress-nginx-kubectl-plugin" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link">¶</a></h2>
|
<h2 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Install <a href="https://github.com/GoogleContainerTools/krew">krew</a>, then run</p>
|
<p>Install <a href="https://github.com/GoogleContainerTools/krew">krew</a>, then run</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl krew install ingress-nginx</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl krew install ingress-nginx</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1442,15 +1442,15 @@ Do not move it without providing redirects.
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Replacing <code class="codehilite">0.24.0</code> with the recently released version.</p>
|
<p>Replacing <code class="codehilite">0.24.0</code> with the recently released version.</p>
|
||||||
<h2 id="common-flags">Common Flags<a class="headerlink" href="#common-flags" title="Permanent link">¶</a></h2>
|
<h2 id="common-flags">Common Flags<a class="headerlink" href="#common-flags" title="Permanent link"> ¶</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Every subcommand supports the basic <code class="codehilite">kubectl</code> configuration flags like <code class="codehilite">--namespace</code>, <code class="codehilite">--context</code>, <code class="codehilite">--client-key</code> and so on.</li>
|
<li>Every subcommand supports the basic <code class="codehilite">kubectl</code> configuration flags like <code class="codehilite">--namespace</code>, <code class="codehilite">--context</code>, <code class="codehilite">--client-key</code> and so on.</li>
|
||||||
<li>Subcommands that act on a particular <code class="codehilite">ingress-nginx</code> pod (<code class="codehilite">backends</code>, <code class="codehilite">certs</code>, <code class="codehilite">conf</code>, <code class="codehilite">exec</code>, <code class="codehilite">general</code>, <code class="codehilite">logs</code>, <code class="codehilite">ssh</code>), support the <code class="codehilite">--deployment <deployment></code> and <code class="codehilite">--pod <pod></code> flags to select either a pod from a deployment with the given name, or a pod with the given name. The <code class="codehilite">--deployment</code> flag defaults to <code class="codehilite">nginx-ingress-controller</code>.</li>
|
<li>Subcommands that act on a particular <code class="codehilite">ingress-nginx</code> pod (<code class="codehilite">backends</code>, <code class="codehilite">certs</code>, <code class="codehilite">conf</code>, <code class="codehilite">exec</code>, <code class="codehilite">general</code>, <code class="codehilite">logs</code>, <code class="codehilite">ssh</code>), support the <code class="codehilite">--deployment <deployment></code> and <code class="codehilite">--pod <pod></code> flags to select either a pod from a deployment with the given name, or a pod with the given name. The <code class="codehilite">--deployment</code> flag defaults to <code class="codehilite">nginx-ingress-controller</code>.</li>
|
||||||
<li>Subcommands that inspect resources (<code class="codehilite">ingresses</code>, <code class="codehilite">lint</code>) support the <code class="codehilite">--all-namespaces</code> flag, which causes them to inspect resources in every namespace.</li>
|
<li>Subcommands that inspect resources (<code class="codehilite">ingresses</code>, <code class="codehilite">lint</code>) support the <code class="codehilite">--all-namespaces</code> flag, which causes them to inspect resources in every namespace.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="subcommands">Subcommands<a class="headerlink" href="#subcommands" title="Permanent link">¶</a></h2>
|
<h2 id="subcommands">Subcommands<a class="headerlink" href="#subcommands" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Note that <code class="codehilite">backends</code>, <code class="codehilite">general</code>, <code class="codehilite">certs</code>, and <code class="codehilite">conf</code> require <code class="codehilite">ingress-nginx</code> version <code class="codehilite">0.23.0</code> or higher.</p>
|
<p>Note that <code class="codehilite">backends</code>, <code class="codehilite">general</code>, <code class="codehilite">certs</code>, and <code class="codehilite">conf</code> require <code class="codehilite">ingress-nginx</code> version <code class="codehilite">0.23.0</code> or higher.</p>
|
||||||
<h3 id="backends">backends<a class="headerlink" href="#backends" title="Permanent link">¶</a></h3>
|
<h3 id="backends">backends<a class="headerlink" href="#backends" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Run <code class="codehilite">kubectl ingress-nginx backends</code> to get a JSON array of the backends that an ingress-nginx controller currently knows about:</p>
|
<p>Run <code class="codehilite">kubectl ingress-nginx backends</code> to get a JSON array of the backends that an ingress-nginx controller currently knows about:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx backends -n ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx backends -n ingress-nginx
|
||||||
<span class="go">[</span>
|
<span class="go">[</span>
|
||||||
|
@ -1480,11 +1480,6 @@ Do not move it without providing redirects.
|
||||||
<span class="go"> }</span>
|
<span class="go"> }</span>
|
||||||
<span class="go"> },</span>
|
<span class="go"> },</span>
|
||||||
<span class="go"> "port": 0,</span>
|
<span class="go"> "port": 0,</span>
|
||||||
<span class="go"> "secureCACert": {</span>
|
|
||||||
<span class="go"> "secret": "",</span>
|
|
||||||
<span class="go"> "caFilename": "",</span>
|
|
||||||
<span class="go"> "caSha": ""</span>
|
|
||||||
<span class="go"> },</span>
|
|
||||||
<span class="go"> "sslPassthrough": false,</span>
|
<span class="go"> "sslPassthrough": false,</span>
|
||||||
<span class="go"> "endpoints": [</span>
|
<span class="go"> "endpoints": [</span>
|
||||||
<span class="go"> {</span>
|
<span class="go"> {</span>
|
||||||
|
@ -1521,7 +1516,7 @@ Do not move it without providing redirects.
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Add the <code class="codehilite">--list</code> option to show only the backend names. Add the <code class="codehilite">--backend <backend></code> option to show only the backend with the given name.</p>
|
<p>Add the <code class="codehilite">--list</code> option to show only the backend names. Add the <code class="codehilite">--backend <backend></code> option to show only the backend with the given name.</p>
|
||||||
<h3 id="certs">certs<a class="headerlink" href="#certs" title="Permanent link">¶</a></h3>
|
<h3 id="certs">certs<a class="headerlink" href="#certs" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Use <code class="codehilite">kubectl ingress-nginx certs --host <hostname></code> to dump the SSL cert/key information for a given host. Requires that <code class="codehilite">--enable-dynamic-certificates</code> is <code class="codehilite">true</code> (this is the default as of version <code class="codehilite">0.24.0</code>).</p>
|
<p>Use <code class="codehilite">kubectl ingress-nginx certs --host <hostname></code> to dump the SSL cert/key information for a given host. Requires that <code class="codehilite">--enable-dynamic-certificates</code> is <code class="codehilite">true</code> (this is the default as of version <code class="codehilite">0.24.0</code>).</p>
|
||||||
<p><strong>WARNING:</strong> This command will dump sensitive private key information. Don't blindly share the output, and certainly don't log it anywhere.</p>
|
<p><strong>WARNING:</strong> This command will dump sensitive private key information. Don't blindly share the output, and certainly don't log it anywhere.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx certs -n ingress-nginx --host testaddr.local
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx certs -n ingress-nginx --host testaddr.local
|
||||||
|
@ -1537,7 +1532,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">-----END RSA PRIVATE KEY-----</span>
|
<span class="go">-----END RSA PRIVATE KEY-----</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="conf">conf<a class="headerlink" href="#conf" title="Permanent link">¶</a></h3>
|
<h3 id="conf">conf<a class="headerlink" href="#conf" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Use <code class="codehilite">kubectl ingress-nginx conf</code> to dump the generated <code class="codehilite">nginx.conf</code> file. Add the <code class="codehilite">--host <hostname></code> option to view only the server block for that host:</p>
|
<p>Use <code class="codehilite">kubectl ingress-nginx conf</code> to dump the generated <code class="codehilite">nginx.conf</code> file. Add the <code class="codehilite">--host <hostname></code> option to view only the server block for that host:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="go">kubectl ingress-nginx conf -n ingress-nginx --host testaddr.local</span>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl ingress-nginx conf -n ingress-nginx --host testaddr.local</span>
|
||||||
|
|
||||||
|
@ -1563,7 +1558,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">...</span>
|
<span class="go">...</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="exec">exec<a class="headerlink" href="#exec" title="Permanent link">¶</a></h3>
|
<h3 id="exec">exec<a class="headerlink" href="#exec" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx exec</code> is exactly the same as <code class="codehilite">kubectl exec</code>, with the same command flags. It will automatically choose an <code class="codehilite">ingress-nginx</code> pod to run the command in.</p>
|
<p><code class="codehilite">kubectl ingress-nginx exec</code> is exactly the same as <code class="codehilite">kubectl exec</code>, with the same command flags. It will automatically choose an <code class="codehilite">ingress-nginx</code> pod to run the command in.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx <span class="nb">exec</span> -i -n ingress-nginx -- ls /etc/nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx <span class="nb">exec</span> -i -n ingress-nginx -- ls /etc/nginx
|
||||||
<span class="go">fastcgi_params</span>
|
<span class="go">fastcgi_params</span>
|
||||||
|
@ -1578,7 +1573,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">template</span>
|
<span class="go">template</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="general">general<a class="headerlink" href="#general" title="Permanent link">¶</a></h3>
|
<h3 id="general">general<a class="headerlink" href="#general" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx general</code> dumps miscellaneous controller state as a JSON object. Currently it just shows the number of controller pods known to a particular controller pod.</p>
|
<p><code class="codehilite">kubectl ingress-nginx general</code> dumps miscellaneous controller state as a JSON object. Currently it just shows the number of controller pods known to a particular controller pod.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx general -n ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx general -n ingress-nginx
|
||||||
<span class="go">{</span>
|
<span class="go">{</span>
|
||||||
|
@ -1586,7 +1581,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">}</span>
|
<span class="go">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="info">info<a class="headerlink" href="#info" title="Permanent link">¶</a></h3>
|
<h3 id="info">info<a class="headerlink" href="#info" title="Permanent link"> ¶</a></h3>
|
||||||
<p>Shows the internal and external IP/CNAMES for an <code class="codehilite">ingress-nginx</code> service.</p>
|
<p>Shows the internal and external IP/CNAMES for an <code class="codehilite">ingress-nginx</code> service.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx info -n ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx info -n ingress-nginx
|
||||||
<span class="go">Service cluster IP address: 10.187.253.31</span>
|
<span class="go">Service cluster IP address: 10.187.253.31</span>
|
||||||
|
@ -1594,7 +1589,7 @@ Do not move it without providing redirects.
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>Use the <code class="codehilite">--service <service></code> flag if your <code class="codehilite">ingress-nginx</code> <code class="codehilite">LoadBalancer</code> service is not named <code class="codehilite">ingress-nginx</code>.</p>
|
<p>Use the <code class="codehilite">--service <service></code> flag if your <code class="codehilite">ingress-nginx</code> <code class="codehilite">LoadBalancer</code> service is not named <code class="codehilite">ingress-nginx</code>.</p>
|
||||||
<h3 id="ingresses">ingresses<a class="headerlink" href="#ingresses" title="Permanent link">¶</a></h3>
|
<h3 id="ingresses">ingresses<a class="headerlink" href="#ingresses" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx ingresses</code>, alternately <code class="codehilite">kubectl ingress-nginx ing</code>, shows a more detailed view of the ingress definitions in a namespace. Compare:</p>
|
<p><code class="codehilite">kubectl ingress-nginx ingresses</code>, alternately <code class="codehilite">kubectl ingress-nginx ing</code>, shows a more detailed view of the ingress definitions in a namespace. Compare:</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl get ingresses --all-namespaces
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl get ingresses --all-namespaces
|
||||||
<span class="go">NAMESPACE NAME HOSTS ADDRESS PORTS AGE</span>
|
<span class="go">NAMESPACE NAME HOSTS ADDRESS PORTS AGE</span>
|
||||||
|
@ -1611,7 +1606,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">default test-ingress-2 * localhost NO echo-service 8080 2</span>
|
<span class="go">default test-ingress-2 * localhost NO echo-service 8080 2</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="lint">lint<a class="headerlink" href="#lint" title="Permanent link">¶</a></h3>
|
<h3 id="lint">lint<a class="headerlink" href="#lint" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx lint</code> can check a namespace or entire cluster for potential configuration issues. This command is especially useful when upgrading between <code class="codehilite">ingress-nginx</code> versions.</p>
|
<p><code class="codehilite">kubectl ingress-nginx lint</code> can check a namespace or entire cluster for potential configuration issues. This command is especially useful when upgrading between <code class="codehilite">ingress-nginx</code> versions.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx lint --all-namespaces --verbose
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx lint --all-namespaces --verbose
|
||||||
<span class="go">Checking ingresses...</span>
|
<span class="go">Checking ingresses...</span>
|
||||||
|
@ -1649,7 +1644,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go"> https://github.com/kubernetes/ingress-nginx/issues/3808</span>
|
<span class="go"> https://github.com/kubernetes/ingress-nginx/issues/3808</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="logs">logs<a class="headerlink" href="#logs" title="Permanent link">¶</a></h3>
|
<h3 id="logs">logs<a class="headerlink" href="#logs" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx logs</code> is almost the same as <code class="codehilite">kubectl logs</code>, with fewer flags. It will automatically choose an <code class="codehilite">ingress-nginx</code> pod to read logs from.</p>
|
<p><code class="codehilite">kubectl ingress-nginx logs</code> is almost the same as <code class="codehilite">kubectl logs</code>, with fewer flags. It will automatically choose an <code class="codehilite">ingress-nginx</code> pod to read logs from.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx logs -n ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx logs -n ingress-nginx
|
||||||
<span class="go">-------------------------------------------------------------------------------</span>
|
<span class="go">-------------------------------------------------------------------------------</span>
|
||||||
|
@ -1669,7 +1664,7 @@ Do not move it without providing redirects.
|
||||||
<span class="go">...</span>
|
<span class="go">...</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="ssh">ssh<a class="headerlink" href="#ssh" title="Permanent link">¶</a></h3>
|
<h3 id="ssh">ssh<a class="headerlink" href="#ssh" title="Permanent link"> ¶</a></h3>
|
||||||
<p><code class="codehilite">kubectl ingress-nginx ssh</code> is exactly the same as <code class="codehilite">kubectl ingress-nginx exec -it -- /bin/bash</code>. Use it when you want to quickly be dropped into a shell inside a running <code class="codehilite">ingress-nginx</code> container.</p>
|
<p><code class="codehilite">kubectl ingress-nginx ssh</code> is exactly the same as <code class="codehilite">kubectl ingress-nginx exec -it -- /bin/bash</code>. Use it when you want to quickly be dropped into a shell inside a running <code class="codehilite">ingress-nginx</code> container.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx ssh -n ingress-nginx
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl ingress-nginx ssh -n ingress-nginx
|
||||||
<span class="gp">www-data@nginx-ingress-controller-7cbf77c976-wx5pn:/etc/nginx$</span>
|
<span class="gp">www-data@nginx-ingress-controller-7cbf77c976-wx5pn:/etc/nginx$</span>
|
||||||
|
|
File diff suppressed because one or more lines are too long
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
|
@ -1283,8 +1283,8 @@ Do not move it without providing redirects.
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<h1 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">¶</a></h1>
|
<h1 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link"> ¶</a></h1>
|
||||||
<h2 id="ingress-controller-logs-and-events">Ingress-Controller Logs and Events<a class="headerlink" href="#ingress-controller-logs-and-events" title="Permanent link">¶</a></h2>
|
<h2 id="ingress-controller-logs-and-events">Ingress-Controller Logs and Events<a class="headerlink" href="#ingress-controller-logs-and-events" title="Permanent link"> ¶</a></h2>
|
||||||
<p>There are many ways to troubleshoot the ingress-controller. The following are basic troubleshooting
|
<p>There are many ways to troubleshoot the ingress-controller. The following are basic troubleshooting
|
||||||
methods to obtain more information.</p>
|
methods to obtain more information.</p>
|
||||||
<p>Check the Ingress Resource Events</p>
|
<p>Check the Ingress Resource Events</p>
|
||||||
|
@ -1359,7 +1359,7 @@ methods to obtain more information.</p>
|
||||||
<span class="go">kube-system kubernetes-dashboard NodePort 10.103.128.17 <none> 80:30000/TCP 30m</span>
|
<span class="go">kube-system kubernetes-dashboard NodePort 10.103.128.17 <none> 80:30000/TCP 30m</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h2 id="debug-logging">Debug Logging<a class="headerlink" href="#debug-logging" title="Permanent link">¶</a></h2>
|
<h2 id="debug-logging">Debug Logging<a class="headerlink" href="#debug-logging" title="Permanent link"> ¶</a></h2>
|
||||||
<p>Using the flag <code class="codehilite">--v=XX</code> it is possible to increase the level of logging. This is performed by editing
|
<p>Using the flag <code class="codehilite">--v=XX</code> it is possible to increase the level of logging. This is performed by editing
|
||||||
the deployment.</p>
|
the deployment.</p>
|
||||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl get deploy -n <namespace-of-ingress-controller>
|
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl get deploy -n <namespace-of-ingress-controller>
|
||||||
|
@ -1376,7 +1376,7 @@ the deployment.</p>
|
||||||
<li><code class="codehilite">--v=3</code> shows details about the service, Ingress rule, endpoint changes and it dumps the nginx configuration in JSON format</li>
|
<li><code class="codehilite">--v=3</code> shows details about the service, Ingress rule, endpoint changes and it dumps the nginx configuration in JSON format</li>
|
||||||
<li><code class="codehilite">--v=5</code> configures NGINX in <a href="http://nginx.org/en/docs/debugging_log.html">debug mode</a></li>
|
<li><code class="codehilite">--v=5</code> configures NGINX in <a href="http://nginx.org/en/docs/debugging_log.html">debug mode</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="authentication-to-the-kubernetes-api-server">Authentication to the Kubernetes API Server<a class="headerlink" href="#authentication-to-the-kubernetes-api-server" title="Permanent link">¶</a></h2>
|
<h2 id="authentication-to-the-kubernetes-api-server">Authentication to the Kubernetes API Server<a class="headerlink" href="#authentication-to-the-kubernetes-api-server" title="Permanent link"> ¶</a></h2>
|
||||||
<p>A number of components are involved in the authentication process and the first step is to narrow
|
<p>A number of components are involved in the authentication process and the first step is to narrow
|
||||||
down the source of the problem, namely whether it is a problem with service authentication or
|
down the source of the problem, namely whether it is a problem with service authentication or
|
||||||
with the kubeconfig file.</p>
|
with the kubeconfig file.</p>
|
||||||
|
@ -1424,7 +1424,7 @@ on the lower left hand side.</p>
|
||||||
+---------------------------------------------------+ +------------------+
|
+---------------------------------------------------+ +------------------+
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<h3 id="service-account">Service Account<a class="headerlink" href="#service-account" title="Permanent link">¶</a></h3>
|
<h3 id="service-account">Service Account<a class="headerlink" href="#service-account" title="Permanent link"> ¶</a></h3>
|
||||||
<p>If using a service account to connect to the API server, Dashboard expects the file
|
<p>If using a service account to connect to the API server, Dashboard expects the file
|
||||||
<code class="codehilite">/var/run/secrets/kubernetes.io/serviceaccount/token</code> to be present. It provides a secret
|
<code class="codehilite">/var/run/secrets/kubernetes.io/serviceaccount/token</code> to be present. It provides a secret
|
||||||
token that is required to authenticate with the API server.</p>
|
token that is required to authenticate with the API server.</p>
|
||||||
|
@ -1516,10 +1516,10 @@ token that is required to authenticate with the API server.</p>
|
||||||
<li><a href="http://kubernetes.io/docs/user-guide/service-accounts/">User Guide: Service Accounts</a></li>
|
<li><a href="http://kubernetes.io/docs/user-guide/service-accounts/">User Guide: Service Accounts</a></li>
|
||||||
<li><a href="http://kubernetes.io/docs/admin/service-accounts-admin/">Cluster Administrator Guide: Managing Service Accounts</a></li>
|
<li><a href="http://kubernetes.io/docs/admin/service-accounts-admin/">Cluster Administrator Guide: Managing Service Accounts</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="kube-config">Kube-Config<a class="headerlink" href="#kube-config" title="Permanent link">¶</a></h2>
|
<h2 id="kube-config">Kube-Config<a class="headerlink" href="#kube-config" title="Permanent link"> ¶</a></h2>
|
||||||
<p>If you want to use a kubeconfig file for authentication, follow the <a href="../deploy/">deploy procedure</a> and
|
<p>If you want to use a kubeconfig file for authentication, follow the <a href="../deploy/">deploy procedure</a> and
|
||||||
add the flag <code class="codehilite">--kubeconfig=/etc/kubernetes/kubeconfig.yaml</code> to the args section of the deployment.</p>
|
add the flag <code class="codehilite">--kubeconfig=/etc/kubernetes/kubeconfig.yaml</code> to the args section of the deployment.</p>
|
||||||
<h2 id="using-gdb-with-nginx">Using GDB with Nginx<a class="headerlink" href="#using-gdb-with-nginx" title="Permanent link">¶</a></h2>
|
<h2 id="using-gdb-with-nginx">Using GDB with Nginx<a class="headerlink" href="#using-gdb-with-nginx" title="Permanent link"> ¶</a></h2>
|
||||||
<p><a href="https://www.gnu.org/software/gdb/">Gdb</a> can be used to with nginx to perform a configuration
|
<p><a href="https://www.gnu.org/software/gdb/">Gdb</a> can be used to with nginx to perform a configuration
|
||||||
dump. This allows us to see which configuration is being used, as well as older configurations.</p>
|
dump. This allows us to see which configuration is being used, as well as older configurations.</p>
|
||||||
<p>Note: The below is based on the nginx <a href="https://docs.nginx.com/nginx/admin-guide/monitoring/debugging/#dumping-nginx-configuration-from-a-running-process">documentation</a>.</p>
|
<p>Note: The below is based on the nginx <a href="https://docs.nginx.com/nginx/admin-guide/monitoring/debugging/#dumping-nginx-configuration-from-a-running-process">documentation</a>.</p>
|
||||||
|
|
|
@ -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>
|
<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>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>
|
<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>
|
<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>
|
<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>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>
|
<p>They are set in the container spec of the <code class="codehilite">nginx-ingress-controller</code> Deployment manifest</p>
|
||||||
<table>
|
<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>
|
<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
|
<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>
|
that it passes several HTTP headers down to its <code class="codehilite">default-backend</code> in case of error:</p>
|
||||||
<table>
|
<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>
|
NGINX does not change the response from the custom default backend.</p>
|
||||||
</div>
|
</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>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>
|
<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
|
<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>
|
(i.e., all the requests that are not mapped with an Ingress).</p>
|
||||||
<p>Basically a default backend exposes two URLs:</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>
|
<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:
|
<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>
|
<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.
|
<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>
|
<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>
|
<ul>
|
||||||
<li><a href="http://danielfm.me/posts/painless-nginx-ingress.html">Pain(less) NGINX Ingress</a></li>
|
<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>
|
<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>
|
<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>
|
<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><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>
|
<p>— Wikipedia</p>
|
||||||
</blockquote>
|
</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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">fastcgi</span>
|
||||||
</pre></div>
|
</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>
|
<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>
|
<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>
|
<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>
|
<blockquote>
|
||||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol: "FCGI"</code></p>
|
<p><code class="codehilite">nginx.ingress.kubernetes.io/backend-protocol: "FCGI"</code></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p>This enables the <em>FastCGI</em> mode for the whole <em>Ingress</em> object.</p>
|
<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>
|
<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>
|
<blockquote>
|
||||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-index: "index.php"</code></p>
|
<p><code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-index: "index.php"</code></p>
|
||||||
</blockquote>
|
</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>
|
<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>
|
<blockquote>
|
||||||
<p><code class="codehilite">nginx.ingress.kubernetes.io/fastcgi-params: "example-configmap"</code></p>
|
<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>
|
<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>
|
<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>
|
<h2 id="regular-expression-support">Regular Expression Support<a class="headerlink" href="#regular-expression-support" title="Permanent link"> ¶</a></h2>
|
||||||
<div class="admonition important">
|
<div class="admonition important">
|
||||||
<p class="admonition-title">Important</p>
|
<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>
|
<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>
|
</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>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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
</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>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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>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>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>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>
|
<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>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>
|
<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>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 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>
|
<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 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>
|
<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>
|
</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>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).
|
<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>
|
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.
|
<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>
|
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>
|
<ul>
|
||||||
<li>Ingress rules for TLS require the definition of the field <code class="codehilite">host</code></li>
|
<li>Ingress rules for TLS require the definition of the field <code class="codehilite">host</code></li>
|
||||||
</ul>
|
</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>
|
<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>
|
<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>
|
<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">
|
<div class="admonition important">
|
||||||
<p class="admonition-title">Important</p>
|
<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>
|
<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>
|
</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>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>
|
<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>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>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>
|
<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>
|
<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>
|
</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>
|
<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>
|
<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>
|
<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>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>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>
|
<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>
|
<div class="codehilite"><pre><span></span><span class="go">kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/grafana/</span>
|
||||||
</pre></div>
|
</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>
|
<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,
|
<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>
|
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>
|
<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.
|
<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>
|
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>
|
<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).
|
<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.
|
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>
|
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>
|
<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>
|
<p>You can add these Kubernetes annotations to specific Ingress objects to customize their behavior.</p>
|
||||||
<div class="admonition tip">
|
<div class="admonition tip">
|
||||||
<p class="admonition-title">Tip</p>
|
<p class="admonition-title">Tip</p>
|
||||||
|
@ -2221,10 +2221,6 @@ table below.</p>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><a href="#server-alias">nginx.ingress.kubernetes.io/server-alias</a></td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -2382,7 +2378,7 @@ table below.</p>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
<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>
|
<ul>
|
||||||
<li>
|
<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>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><strong>Known Limitations</strong></p>
|
||||||
<p>Currently a maximum of one canary ingress can be applied per Ingress rule.</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.
|
<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>
|
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>
|
<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 class="admonition-title">Example</p>
|
||||||
<p>Please check the <a href="../../../examples/rewrite/">rewrite</a> example.</p>
|
<p>Please check the <a href="../../../examples/rewrite/">rewrite</a> example.</p>
|
||||||
</div>
|
</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.
|
<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>
|
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>
|
<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 class="admonition-title">Example</p>
|
||||||
<p>Please check the <a href="../../../examples/affinity/cookie/">affinity</a> example.</p>
|
<p>Please check the <a href="../../../examples/affinity/cookie/">affinity</a> example.</p>
|
||||||
</div>
|
</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>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>
|
<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>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:
|
<p>The annotations are:
|
||||||
<div class="codehilite"><pre><span></span>nginx.ingress.kubernetes.io/auth-type: [basic|digest]
|
<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 class="admonition-title">Example</p>
|
||||||
<p>Please check the <a href="../../../examples/auth/basic/">auth</a> example.</p>
|
<p>Please check the <a href="../../../examples/auth/basic/">auth</a> example.</p>
|
||||||
</div>
|
</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>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>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>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><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>"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>
|
<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>
|
<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>
|
<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>
|
<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>
|
</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>
|
<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>It is possible to enable Client Certificate Authentication using additional annotations in Ingress Rule.</p>
|
||||||
<p>The annotations are:</p>
|
<p>The annotations are:</p>
|
||||||
<ul>
|
<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>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>
|
<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>
|
</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>
|
<p>It is possible to authenticate to a proxied HTTPS backend with certificate using additional annotations in Ingress Rule.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-ssl-secret: secretName</code>:
|
<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>:
|
<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>
|
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>
|
</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>
|
<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>
|
<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>
|
<span class="no">more_set_headers "Request-Id: $req_id";</span>
|
||||||
</pre></div>
|
</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).
|
<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).
|
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>
|
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:
|
<p>Example usage:
|
||||||
<div class="codehilite"><pre><span></span>nginx.ingress.kubernetes.io/custom-http-errors: "404,415"
|
<div class="codehilite"><pre><span></span>nginx.ingress.kubernetes.io/custom-http-errors: "404,415"
|
||||||
</pre></div></p>
|
</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 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>
|
<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
|
<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
|
<code class="codehilite">nginx.ingress.kubernetes.io/enable-cors: "true"</code>. This will add a section in the server
|
||||||
location enabling this functionality.</p>
|
location enabling this functionality.</p>
|
||||||
|
@ -2573,7 +2569,7 @@ location enabling this functionality.</p>
|
||||||
<p class="admonition-title">Note</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>
|
<p>For more information please see <a href="https://enable-cors.org/server_nginx.html">https://enable-cors.org</a></p>
|
||||||
</div>
|
</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>
|
<p>Enables automatic conversion of preload links specified in the “Link” response header fields into push requests.</p>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">Example</p>
|
<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>
|
<li><code class="codehilite">nginx.ingress.kubernetes.io/http2-push-preload: "true"</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>.
|
<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>
|
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">
|
<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>
|
place over the alias configuration.</p>
|
||||||
</div>
|
</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>
|
<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>
|
<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>
|
<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>
|
<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 class="admonition-title">Attention</p>
|
||||||
<p>This annotation can be used only once per host.</p>
|
<p>This annotation can be used only once per host.</p>
|
||||||
</div>
|
</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,
|
<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.
|
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
|
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>
|
</ul>
|
||||||
</div>
|
</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>
|
<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>
|
<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>
|
<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>
|
</pre></div>
|
||||||
|
@ -2669,12 +2665,12 @@ applied to each location provided in the ingress rule.</p>
|
||||||
<p class="admonition-title">Example</p>
|
<p class="admonition-title">Example</p>
|
||||||
<p>Please check the <a href="../../../examples/auth/external-auth/">external-auth</a> example.</p>
|
<p>Please check the <a href="../../../examples/auth/external-auth/">external-auth</a> example.</p>
|
||||||
</div>
|
</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.
|
<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>:
|
<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>
|
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>
|
<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>
|
<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>
|
<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>
|
<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>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>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>
|
<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>
|
<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>
|
<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>
|
<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
|
<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
|
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>
|
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
|
<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>
|
invalidates all the other annotations set on an Ingress object.</p>
|
||||||
</div>
|
</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>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>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>
|
<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>
|
<p>If the <code class="codehilite">service-upstream</code> annotation is specified the following things should be taken into consideration:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Sticky Sessions will not work as only round-robin load balancing is supported.</li>
|
<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>
|
<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>
|
</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.
|
<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>
|
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>
|
<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
|
<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.
|
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>
|
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.
|
<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>
|
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">
|
<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 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>
|
<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>
|
</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.
|
<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>
|
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>
|
<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 class="admonition-title">Note</p>
|
||||||
<p>Adding an annotation to an Ingress rule overrides any global restriction.</p>
|
<p>Adding an annotation to an Ingress rule overrides any global restriction.</p>
|
||||||
</div>
|
</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.
|
<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>
|
In some scenarios is required to have different values. To allow this we provide annotations that allows this customization:</p>
|
||||||
<ul>
|
<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-next-upstream-tries</code></li>
|
||||||
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-request-buffering</code></li>
|
<li><code class="codehilite">nginx.ingress.kubernetes.io/proxy-request-buffering</code></li>
|
||||||
</ul>
|
</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
|
<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>
|
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>,
|
<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>
|
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>
|
<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>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>.
|
<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>
|
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>
|
<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>
|
</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>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>
|
<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>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>
|
<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>.
|
<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>
|
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>.
|
<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>
|
<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>
|
</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.
|
<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>
|
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:
|
<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>
|
<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>
|
</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.
|
<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>
|
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:
|
<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>
|
<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>
|
</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>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>The zero value disables buffering of responses to temporary files.</p>
|
||||||
<p>To use custom values in an Ingress rule, define this annotation:
|
<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>
|
<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>
|
</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.
|
<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>
|
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>
|
<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>
|
</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>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>
|
<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>
|
<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>
|
</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.
|
<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>
|
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>
|
<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>
|
</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
|
<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>
|
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>
|
<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>
|
</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.
|
<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>
|
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>
|
<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>
|
</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>
|
<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>
|
<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>
|
</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>
|
<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>
|
Web Application Firewall per location.</p>
|
||||||
<p>Following configuration will enable the WAF for the paths defined in the corresponding ingress:</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>
|
</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>
|
<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
|
<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
|
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
|
<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/owasp-modsecurity-crs/nginx-modsecurity.conf</span>
|
||||||
<span class="l l-Scalar l-Scalar-Plain">Include /etc/nginx/modsecurity/modsecurity.conf</span>
|
<span class="l l-Scalar l-Scalar-Plain">Include /etc/nginx/modsecurity/modsecurity.conf</span>
|
||||||
</pre></div></p>
|
</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
|
<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>
|
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>
|
<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>
|
</ul>
|
||||||
<p>It's important to remember that there's no DNS resolver at this stage so you will have to configure
|
<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>
|
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)
|
<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>
|
Valid Values: HTTP, HTTPS, GRPC, GRPCS and AJP</p>
|
||||||
<p>By default NGINX uses <code class="codehilite">HTTP</code>.</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>
|
<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>
|
</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">
|
<div class="admonition attention">
|
||||||
<p class="admonition-title">Attention</p>
|
<p class="admonition-title">Attention</p>
|
||||||
</div>
|
</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>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>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>
|
<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>
|
<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>
|
<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>
|
</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>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>
|
<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>
|
<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
|
http2-max-requests
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#http2-max-concurrent-streams" class="md-nav__link">
|
||||||
|
http2-max-concurrent-streams
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
|
@ -2343,6 +2350,13 @@
|
||||||
http2-max-requests
|
http2-max-requests
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#http2-max-concurrent-streams" class="md-nav__link">
|
||||||
|
http2-max-concurrent-streams
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<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>
|
<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>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
|
<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>
|
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>
|
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>
|
<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>
|
</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>
|
<p>The following table shows a configuration option's name, type, and the default value:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -3347,6 +3361,11 @@ Same for numbers, like "100".</p>
|
||||||
<td align="left">1000</td>
|
<td align="left">1000</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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"><a href="#hsts">hsts</a></td>
|
||||||
<td align="left">bool</td>
|
<td align="left">bool</td>
|
||||||
<td align="left">"true"</td>
|
<td align="left">"true"</td>
|
||||||
|
@ -3948,83 +3967,87 @@ Same for numbers, like "100".</p>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
<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>
|
<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.
|
<p>Sets additional header that will not be passed from the upstream server to the client response.
|
||||||
<em><strong>default:</strong></em> empty</p>
|
<em><strong>default:</strong></em> empty</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Additional params for access_log. For example, buffer=16k, gzip, flush=1m</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>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>
|
<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>
|
<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>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><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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>Allows to configure a custom buffer size for reading client request header.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Defines a timeout for reading client request header, in seconds.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Sets buffer size for reading client request body.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Defines a timeout for reading client request body, in seconds.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Disables the Access Log from the entire Ingress Controller. <em><strong>default:</strong></em> '"false"'</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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.
|
<p>Set if header fields with invalid names should be ignored.
|
||||||
<em><strong>default:</strong></em> is enabled</p>
|
<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>
|
<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>Configures the logging level of errors. Log levels above are listed in the order of increasing severity.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Limits the maximum size of an HPACK-compressed request header field.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Limits the maximum size of the entire request header list after HPACK decompression.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>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>
|
<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>
|
<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.
|
<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>
|
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>
|
<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://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>
|
<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>
|
</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>
|
<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>
|
<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>
|
<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>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>
|
<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>
|
<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>Sets the maximum number of requests that can be served through one keep-alive connection.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>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>
|
<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>
|
<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>
|
<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>.
|
<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>
|
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>
|
<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>
|
</pre></div>
|
||||||
|
|
||||||
<p>Please check the <a href="../log-format/">log-format</a> for definition of each field.</p>
|
<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>
|
<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.
|
<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>
|
<em><strong>default:</strong></em> true</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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.
|
<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>.
|
0 will use the value of <a href="#max-worker-open-files">max-worker-open-files</a>.
|
||||||
<em><strong>default:</strong></em> 16384</p>
|
<em><strong>default:</strong></em> 16384</p>
|
||||||
|
@ -4077,57 +4100,57 @@ Example for json output:</p>
|
||||||
<p class="admonition-title">Tip</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>
|
<p>Using 0 in scenarios of high load improves performance at the cost of increasing RAM utilization (even on idle).</p>
|
||||||
</div>
|
</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.
|
<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".
|
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>
|
<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>
|
<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>
|
<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>
|
<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>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>
|
<p><em>References:</em>
|
||||||
<a href="http://nginx.org/en/docs/hash.html">http://nginx.org/en/docs/hash.html</a></p>
|
<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>Sets the size of the bucket for the server names hash tables.</p>
|
||||||
<p><em>References:</em></p>
|
<p><em>References:</em></p>
|
||||||
<ul>
|
<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/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>
|
<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>
|
</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>Sets the maximum size of the proxy headers hash tables.</p>
|
||||||
<p><em>References:</em></p>
|
<p><em>References:</em></p>
|
||||||
<ul>
|
<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/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>
|
<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>
|
</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
|
<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>
|
<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>Sets the size of the bucket for the proxy headers hash tables.</p>
|
||||||
<p><em>References:</em></p>
|
<p><em>References:</em></p>
|
||||||
<ul>
|
<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/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>
|
<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>
|
</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>
|
<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>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:
|
<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>
|
<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>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>
|
<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>Specifies a curve for ECDHE ciphers.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Sets the name of the secret that contains Diffie-Hellman key to help with "Perfect Forward Secrecy".</p>
|
||||||
<p><em>References:</em></p>
|
<p><em>References:</em></p>
|
||||||
<ul>
|
<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="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>
|
<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>
|
</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>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>
|
<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>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>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>
|
<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>
|
<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>
|
<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>
|
<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.
|
<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>
|
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>
|
<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>
|
<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>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>
|
<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>
|
<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>
|
<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.
|
<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>
|
<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>
|
<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.
|
<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>
|
<em><strong>default:</strong></em> true</p>
|
||||||
<blockquote>
|
<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>
|
<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>
|
</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.
|
<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>
|
<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>.
|
<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>
|
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>
|
<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>
|
<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>
|
</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>
|
<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.
|
<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>
|
<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>
|
<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>
|
<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.
|
<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>
|
<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>.
|
<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>
|
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>.
|
<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>
|
By default worker processes are not bound to any specific CPUs. The value can be:</p>
|
||||||
<ul>
|
<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>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>
|
<li>auto: binding worker processes automatically to available CPUs.</li>
|
||||||
</ul>
|
</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>
|
<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.
|
<p>Sets the algorithm to use for load balancing.
|
||||||
The value can either be:</p>
|
The value can either be:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -4219,148 +4242,148 @@ The value can either be:</p>
|
||||||
</ul>
|
</ul>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Sets the bucket size for the variables hash table.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>Sets the maximum size of the variables hash table.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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
|
<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
|
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.
|
exceeded, the least recently used connections are closed.
|
||||||
<em><strong>default:</strong></em> 32</p>
|
<em><strong>default:</strong></em> 32</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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.
|
<p>Sets a timeout during which an idle keepalive connection to an upstream server will stay open.
|
||||||
<em><strong>default:</strong></em> 60</p>
|
<em><strong>default:</strong></em> 60</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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
|
<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.
|
requests is made, the connection is closed.
|
||||||
<em><strong>default:</strong></em> 100</p>
|
<em><strong>default:</strong></em> 100</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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>
|
<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>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>
|
<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>
|
<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>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>
|
<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>
|
<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>
|
<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 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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>Enables the nginx Opentracing extension. <em><strong>default:</strong></em> is disabled</p>
|
||||||
<p><em>References:</em>
|
<p><em>References:</em>
|
||||||
<a href="https://github.com/opentracing-contrib/nginx-opentracing">https://github.com/opentracing-contrib/nginx-opentracing</a></p>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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.
|
<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>
|
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.
|
<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>
|
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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>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>
|
<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>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>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>
|
<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.
|
<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>
|
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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>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>
|
<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>
|
<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>
|
<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).
|
<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>
|
<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.
|
<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>
|
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>
|
<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>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>
|
<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>
|
<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>
|
<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>
|
<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>], ..."
|
<div class="codehilite"><pre><span></span>lua-shared-dicts: "<my dict name>: <my dict size>, [<my dict name>: <my dict size>], ..."
|
||||||
</pre></div>
|
</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>
|
<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>
|
<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.
|
<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>
|
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>
|
<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><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>
|
<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>
|
</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>
|
<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>
|
<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>
|
<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.
|
<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>
|
<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.
|
<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>.
|
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".
|
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>
|
<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>
|
<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.
|
<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>.
|
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-method</code>.
|
||||||
<em><strong>default:</strong></em> ""</p>
|
<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.
|
<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>.
|
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-signin</code>.
|
||||||
<em><strong>default:</strong></em> ""</p>
|
<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.
|
<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>.
|
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-response-headers</code>.
|
||||||
<em><strong>default:</strong></em> ""</p>
|
<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.
|
<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>.
|
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-request-redirect</code>.
|
||||||
<em><strong>default:</strong></em> ""</p>
|
<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.
|
<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>.
|
Similar to the Ingress rule annotation <code class="codehilite">nginx.ingress.kubernetes.io/auth-request-redirect</code>.
|
||||||
<em><strong>default:</strong></em> ""</p>
|
<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>
|
<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>
|
<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.
|
<p>A comma-separated list of locations that should not get authenticated.
|
||||||
<em><strong>default:</strong></em> "/.well-known/acme-challenge"</p>
|
<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>A comma-separated list of IP addresses (or subnets), request from which have to be blocked globally.</p>
|
||||||
<p><em>References:</em>
|
<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>
|
<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.
|
<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>
|
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>
|
<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>
|
<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.
|
<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>
|
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>
|
<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>
|
<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>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.
|
<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>
|
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>
|
<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>
|
<p>There are three ways to customize NGINX:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="configmap/">ConfigMap</a>: using a Configmap to set global configurations in NGINX.</li>
|
<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>
|
<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>
|
<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
|
<div class="codehilite"><pre><span></span>log_format upstreaminfo
|
||||||
'$remote_addr - $remote_user [$time_local] "$request" '
|
'$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>
|
<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>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 <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.
|
<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>
|
<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>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.
|
<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>
|
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:
|
<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>
|
<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>
|
<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
|
datadog-operation-name-override
|
||||||
</pre></div></p>
|
</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>
|
<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
|
<p>The following examples show how to deploy and test different distributed tracing systems. These example can be performed
|
||||||
using Minikube.</p>
|
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>
|
<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>
|
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
|
<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:
|
<p>In the Zipkin interface we can see the details:
|
||||||
<img alt="zipkin screenshot" src="../../../images/zipkin-demo.png" title="zipkin collector screenshot" /></p>
|
<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>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<p>Enable Ingress addon in Minikube:
|
<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>
|
<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>
|
<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>
|
<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>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>
|
<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>
|
<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>
|
</pre></div>
|
||||||
|
|
||||||
<p>The resulting secret will be of type <code class="codehilite">kubernetes.io/tls</code>.</p>
|
<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
|
<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>
|
<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.
|
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>
|
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
|
<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>
|
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>
|
<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
|
<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>
|
default. This is required to enable passthrough backends in Ingress objects.</p>
|
||||||
<div class="admonition warning">
|
<div class="admonition warning">
|
||||||
<p class="admonition-title">Warning</p>
|
<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
|
<p>Unlike HTTP backends, traffic to Passthrough backends is sent to the <em>clusterIP</em> of the backing Service instead of
|
||||||
individual Endpoints.</p>
|
individual Endpoints.</p>
|
||||||
</div>
|
</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
|
<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
|
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
|
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>
|
HTTP to the specified domain and will instead send all communications over HTTPS.</p>
|
||||||
<p>HSTS is enabled by default.</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>
|
<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
|
<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>
|
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>,
|
<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>
|
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>
|
annotation in the particular resource.</p>
|
||||||
</div>
|
</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">
|
<div class="admonition tip">
|
||||||
<p class="admonition-title">Tip</p>
|
<p class="admonition-title">Tip</p>
|
||||||
<p>Kube-Lego has reached end-of-life and is being
|
<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>.
|
<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>
|
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>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>
|
<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>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,
|
<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>
|
May 2018, <a href="https://developer.android.com/about/dashboards/#Platform">approximately 15% of Android devices</a>
|
||||||
|
|
Loading…
Reference in a new issue