</code></pre></div><p>Please check the microk8s <ahref=https://microk8s.io/docs/addon-ingress>documentation page</a></p><h4id=aws>AWS<aclass=headerlinkhref=#awstitle="Permanent link"> ¶</a></h4><p>In AWS we use a Network load balancer (NLB) to expose the NGINX Ingress controller behind a Service of <code>Type=LoadBalancer</code>.</p><h5id=network-load-balancer-nlb>Network Load Balancer (NLB)<aclass=headerlinkhref=#network-load-balancer-nlbtitle="Permanent link"> ¶</a></h5><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy.yaml</span>
</code></pre></div><h5id=tls-termination-in-aws-load-balancer-elb>TLS termination in AWS Load Balancer (ELB)<aclass=headerlinkhref=#tls-termination-in-aws-load-balancer-elbtitle="Permanent link"> ¶</a></h5><p>In some scenarios is required to terminate TLS in the Load Balancer and not in the ingress controller.</p><p>For this purpose we provide a template:</p><ul><li>Download <ahref=https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy-tls-termination.yaml>deploy-tls-termination.yaml</a></li></ul><divclass=highlight><pre><span></span><code><spanclass=go>wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy-tls-termination.yaml</span>
</code></pre></div><ul><li><p>Edit the file and change:</p></li><li><p>VPC CIDR in use for the Kubernetes cluster:</p></li></ul><p><code>proxy-real-ip-cidr: XXX.XXX.XXX/XX</code></p><ul><li>AWS Certificate Manager (ACM) ID</li></ul><p><code>arn:aws:acm:us-west-2:XXXXXXXX:certificate/XXXXXX-XXXXXXX-XXXXXXX-XXXXXXXX</code></p><ul><li>Deploy the manifest:</li></ul><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f deploy-tls-termination.yaml</span>
</code></pre></div><h5id=nlb-idle-timeouts>NLB Idle Timeouts<aclass=headerlinkhref=#nlb-idle-timeoutstitle="Permanent link"> ¶</a></h5><p>Idle timeout value for TCP flows is 350 seconds and <ahref=https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout>cannot be modified</a>.</p><p>For this reason, you need to ensure the <ahref=http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout>keepalive_timeout</a> value is configured less than 350 seconds to work as expected.</p><p>By default NGINX <code>keepalive_timeout</code> is set to <code>75s</code>.</p><p>More information with regards to timeouts can be found in the <ahref=https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout>official AWS documentation</a></p><h4id=gce-gke>GCE-GKE<aclass=headerlinkhref=#gce-gketitle="Permanent link"> ¶</a></h4><divclass="admonition info"><pclass=admonition-title>Info</p><p>Initialize your user as a cluster-admin with the following command: <divclass=highlight><pre><span></span><code><spanclass=go>kubectl create clusterrolebinding cluster-admin-binding \</span>
</code></pre></div></p></div><divclass="admonition danger"><pclass=admonition-title>Danger</p><p>For private clusters, you will need to either add an additional firewall rule that allows master nodes access to port <code>8443/tcp</code> on worker nodes, or change the existing rule that allows access to ports <code>80/tcp</code>, <code>443/tcp</code> and <code>10254/tcp</code> to also allow access to port <code>8443/tcp</code>.</p><p>See the <ahref=https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules>GKE documentation</a> on adding rules and the <ahref=https://github.com/kubernetes/kubernetes/issues/79739>Kubernetes issue</a> for more detail.</p></div><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/cloud/deploy.yaml</span>
</code></pre></div><divclass="admonition failure important"><pclass=admonition-title>Failure</p><p>Proxy protocol is not supported in GCE/GKE</p></div><h4id=azure>Azure<aclass=headerlinkhref=#azuretitle="Permanent link"> ¶</a></h4><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/cloud/deploy.yaml</span>
</code></pre></div><p>More information with regards to Azure annotations for ingress controller can be found in the <ahref=https://docs.microsoft.com/en-us/azure/aks/ingress-internal-ip#create-an-ingress-controller>official AKS documentation</a>.</p><h4id=digital-ocean>Digital Ocean<aclass=headerlinkhref=#digital-oceantitle="Permanent link"> ¶</a></h4><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/do/deploy.yaml</span>
</code></pre></div><p>The full list of annotations supported by Exoscale is available in the Exoscale Cloud Controller Manager <ahref=https://github.com/exoscale/exoscale-cloud-controller-manager/blob/master/docs/service-loadbalancer.md>documentation</a>.</p><h4id=oracle-cloud-infrastructure>Oracle Cloud Infrastructure<aclass=headerlinkhref=#oracle-cloud-infrastructuretitle="Permanent link"> ¶</a></h4><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/cloud/deploy.yaml</span>
</code></pre></div><p>A <ahref=https://github.com/oracle/oci-cloud-controller-manager/blob/master/docs/load-balancer-annotations.md>complete list of available annotations for Oracle Cloud Infrastructure</a> can be found in the <ahref=https://github.com/oracle/oci-cloud-controller-manager>OCI Cloud Controller Manager</a> documentation.</p><h4id=bare-metal>Bare-metal<aclass=headerlinkhref=#bare-metaltitle="Permanent link"> ¶</a></h4><p>Using <ahref=https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport>NodePort</a>:</p><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/baremetal/deploy.yaml</span>
</code></pre></div><divclass="admonition tip"><pclass=admonition-title>Tip</p><p>Applicable on kubernetes clusters deployed on bare-metal with generic Linux distro(Such as CentOs, Ubuntu ...).</p></div><divclass="admonition info"><pclass=admonition-title>Info</p><p>For extended notes regarding deployments on bare-metal, see <ahref=baremetal/>Bare-metal considerations</a>.</p></div><h3id=verify-installation>Verify installation<aclass=headerlinkhref=#verify-installationtitle="Permanent link"> ¶</a></h3><p>To check if the ingress controller pods have started, run the following command:</p><divclass=highlight><pre><span></span><code><spanclass=go>kubectl get pods -n ingress-nginx \</span>
</code></pre></div><p>Once the ingress controller pods are running, you can cancel the command typing <code>Ctrl+C</code>.</p><p>Now, you are ready to create your first ingress.</p><h3id=detect-installed-version>Detect installed version<aclass=headerlinkhref=#detect-installed-versiontitle="Permanent link"> ¶</a></h3><p>To detect which version of the ingress controller is running, exec into the pod and run <code>nginx-ingress-controller --version</code>.</p><divclass=highlight><pre><span></span><code><spanclass=go>POD_NAMESPACE=ingress-nginx</span>
<spanclass=go>POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}')</span>
</code></pre></div><h2id=using-helm>Using Helm<aclass=headerlinkhref=#using-helmtitle="Permanent link"> ¶</a></h2><divclass="admonition attention"><pclass=admonition-title>Attention</p><p>Only Helm v3 is supported</p></div><p>NGINX Ingress controller can be installed via <ahref=https://helm.sh/>Helm</a> using the chart from the project repository. To install the chart with the release name <code>ingress-nginx</code>:</p><divclass=highlight><pre><span></span><code><spanclass=go>helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx</span>
</code></pre></div></article></div></div></main><footerclass=md-footer><divclass=md-footer-nav><navclass="md-footer-nav__inner md-grid"aria-label=Footer><ahref=../kubectl-plugin/class="md-footer-nav__link md-footer-nav__link--prev"rel=prev><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg></div><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Previous </span> kubectl plugin </div></div></a><ahref=baremetal/class="md-footer-nav__link md-footer-nav__link--next"rel=next><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Next </span> Bare-metal considerations </div></div><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg></div></a></nav></div><divclass="md-footer-meta md-typeset"><divclass="md-footer-meta__inner md-grid"><divclass=md-footer-copyright> Made with <ahref=https://squidfunk.github.io/mkdocs-material/target=_blankrel=noopener> Material for MkDocs </a></div></div></div></footer></div><scriptsrc=../assets/javascripts/vendor.93c04032.min.js></script><scriptsrc=../assets/javascripts/bundle.83e5331e.min.js></script><scriptid=__langtype=application/json>{"clipboard.copy":"Copy to clipboard","clipboard.copied":"Copied to clipboard","search.config.lang":"en","search.config.pipeline":"trimmer, stopWordFilter","search.config.separator":"[\\s\\-]+","search.placeholder":"Search","search.result.placeholder":"Type to start searching","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.term.missing":"Missing"}</script><script>