Deploy GitHub Pages

This commit is contained in:
k8s-ci-robot 2021-08-07 00:08:36 +00:00
parent cca2f76586
commit f67deeab95
24 changed files with 81 additions and 81 deletions

File diff suppressed because one or more lines are too long

View file

@ -15,7 +15,7 @@
</code></pre></div> <div class="admonition failure important"> <p class=admonition-title>Failure</p> <p>Proxy protocol is not supported in GCE/GKE</p> </div> <h4 id=azure>Azure<a class=headerlink href=#azure title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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> <div class="admonition failure important"> <p class=admonition-title>Failure</p> <p>Proxy protocol is not supported in GCE/GKE</p> </div> <h4 id=azure>Azure<a class=headerlink href=#azure title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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 <a href=https://docs.microsoft.com/en-us/azure/aks/ingress-internal-ip#create-an-ingress-controller>official AKS documentation</a>.</p> <h4 id=digital-ocean>Digital Ocean<a class=headerlink href=#digital-ocean title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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>More information with regards to Azure annotations for ingress controller can be found in the <a href=https://docs.microsoft.com/en-us/azure/aks/ingress-internal-ip#create-an-ingress-controller>official AKS documentation</a>.</p> <h4 id=digital-ocean>Digital Ocean<a class=headerlink href=#digital-ocean title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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> <h4 id=scaleway>Scaleway<a class=headerlink href=#scaleway title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/scw/deploy.yaml</span> </code></pre></div> <h4 id=scaleway>Scaleway<a class=headerlink href=#scaleway title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/scw/deploy.yaml</span>
</code></pre></div> <h4 id=exoscale>Exoscale<a class=headerlink href=#exoscale title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/exoscale/deploy.yaml</span> </code></pre></div> <h4 id=exoscale>Exoscale<a class=headerlink href=#exoscale title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=go>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/exoscale/deploy.yaml</span>
</code></pre></div> <p>The full list of annotations supported by Exoscale is available in the Exoscale Cloud Controller Manager <a href=https://github.com/exoscale/exoscale-cloud-controller-manager/blob/master/docs/service-loadbalancer.md>documentation</a>.</p> <h4 id=oracle-cloud-infrastructure>Oracle Cloud Infrastructure<a class=headerlink href=#oracle-cloud-infrastructure title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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>The full list of annotations supported by Exoscale is available in the Exoscale Cloud Controller Manager <a href=https://github.com/exoscale/exoscale-cloud-controller-manager/blob/master/docs/service-loadbalancer.md>documentation</a>.</p> <h4 id=oracle-cloud-infrastructure>Oracle Cloud Infrastructure<a class=headerlink href=#oracle-cloud-infrastructure title="Permanent link"></a></h4> <div class=highlight><pre><span></span><code><span class=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 <a href=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 <a href=https://github.com/oracle/oci-cloud-controller-manager>OCI Cloud Controller Manager</a> documentation.</p> <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> <div class=highlight><pre><span></span><code><span class=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> <p>A <a href=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 <a href=https://github.com/oracle/oci-cloud-controller-manager>OCI Cloud Controller Manager</a> documentation.</p> <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> <div class=highlight><pre><span></span><code><span class=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> <div class="admonition tip"> <p class=admonition-title>Tip</p> <p>Applicable on kubernetes clusters deployed on bare-metal with generic Linux distro(Such as CentOs, Ubuntu ...).</p> </div> <div class="admonition info"> <p class=admonition-title>Info</p> <p>For extended notes regarding deployments on bare-metal, see <a href=baremetal/ >Bare-metal considerations</a>.</p> </div> <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> <div class=highlight><pre><span></span><code><span class=go>kubectl get pods -n ingress-nginx \</span> </code></pre></div> <div class="admonition tip"> <p class=admonition-title>Tip</p> <p>Applicable on kubernetes clusters deployed on bare-metal with generic Linux distro(Such as CentOs, Ubuntu ...).</p> </div> <div class="admonition info"> <p class=admonition-title>Info</p> <p>For extended notes regarding deployments on bare-metal, see <a href=baremetal/ >Bare-metal considerations</a>.</p> </div> <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> <div class=highlight><pre><span></span><code><span class=go>kubectl get pods -n ingress-nginx \</span>

View file

@ -16,7 +16,7 @@
nginx-ingress-controller=k8s.gcr.io/ingress-nginx/controller:v0.34.1@sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 \ nginx-ingress-controller=k8s.gcr.io/ingress-nginx/controller:v0.34.1@sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 \
-n ingress-nginx -n ingress-nginx
</code></pre></div> <p>For interactive editing, use <code>kubectl edit deployment nginx-ingress-controller -n ingress-nginx</code>.</p> <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>ngx-ingress</code>, you should be able to upgrade using</p> <div class=highlight><pre><span></span><code>helm upgrade --reuse-values ngx-ingress ingress-nginx/ingress-nginx </code></pre></div> <p>For interactive editing, use <code>kubectl edit deployment nginx-ingress-controller -n ingress-nginx</code>.</p> <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>ngx-ingress</code>, you should be able to upgrade using</p> <div class=highlight><pre><span></span><code>helm upgrade --reuse-values ngx-ingress ingress-nginx/ingress-nginx
</code></pre></div> <h3 id=migrating-from-stablenginx-ingress>Migrating from stable/nginx-ingress<a class=headerlink href=#migrating-from-stablenginx-ingress title="Permanent link"></a></h3> <p>See detailed steps in the upgrading section of the <code>ingress-nginx</code> chart <a href=https://github.com/kubernetes/ingress-nginx/blob/master/charts/ingress-nginx/README.md#migrating-from-stablenginx-ingress>README</a>.</p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../rbac/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Role Based Access Control (RBAC) </div> </div> </a> <a href=../hardening-guide/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Hardening guide </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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> </code></pre></div> <h3 id=migrating-from-stablenginx-ingress>Migrating from stable/nginx-ingress<a class=headerlink href=#migrating-from-stablenginx-ingress title="Permanent link"></a></h3> <p>See detailed steps in the upgrading section of the <code>ingress-nginx</code> chart <a href=https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/README.md#migrating-from-stablenginx-ingress>README</a>.</p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../rbac/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Role Based Access Control (RBAC) </div> </div> </a> <a href=../hardening-guide/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Hardening guide </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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>
app = initialize({ app = initialize({
base: "../..", base: "../..",
features: ['navigation.tabs', 'navigation.tabs.sticky', 'navigation.instant', 'navigation.sections'], features: ['navigation.tabs', 'navigation.tabs.sticky', 'navigation.instant', 'navigation.sections'],

File diff suppressed because one or more lines are too long

View file

@ -3,7 +3,7 @@
</code></pre></div> <p><strong>Run unit-tests for lua code</strong></p> <div class=highlight><pre><span></span><code><span class=go>make lua-test</span> </code></pre></div> <p><strong>Run unit-tests for lua code</strong></p> <div class=highlight><pre><span></span><code><span class=go>make lua-test</span>
</code></pre></div> <p>Lua tests are located in the directory <code>rootfs/etc/nginx/lua/test</code></p> <div class="admonition important"> <p class=admonition-title>Important</p> <p>Test files must follow the naming convention <code>&lt;mytest&gt;_test.lua</code> or it will be ignored</p> </div> <p><strong>Run e2e test suite</strong></p> <div class=highlight><pre><span></span><code><span class=go>make kind-e2e-test</span> </code></pre></div> <p>Lua tests are located in the directory <code>rootfs/etc/nginx/lua/test</code></p> <div class="admonition important"> <p class=admonition-title>Important</p> <p>Test files must follow the naming convention <code>&lt;mytest&gt;_test.lua</code> or it will be ignored</p> </div> <p><strong>Run e2e test suite</strong></p> <div class=highlight><pre><span></span><code><span class=go>make kind-e2e-test</span>
</code></pre></div> <p>To limit the scope of the tests to execute, we can use the environment variable <code>FOCUS</code></p> <div class=highlight><pre><span></span><code><span class=go>FOCUS=&quot;no-auth-locations&quot; make kind-e2e-test</span> </code></pre></div> <p>To limit the scope of the tests to execute, we can use the environment variable <code>FOCUS</code></p> <div class=highlight><pre><span></span><code><span class=go>FOCUS=&quot;no-auth-locations&quot; make kind-e2e-test</span>
</code></pre></div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>The variable <code>FOCUS</code> defines Ginkgo <a href=https://onsi.github.io/ginkgo/#focused-specs>Focused Specs</a></p> </div> <p>Valid values are defined in the describe definition of the e2e tests like <a href=https://github.com/kubernetes/ingress-nginx/blob/master/test/e2e/defaultbackend/default_backend.go#L29>Default Backend</a></p> <p>The complete list of tests can be found <a href=e2e-tests.md>here</a></p> <h3 id=custom-docker-image>Custom docker image<a class=headerlink href=#custom-docker-image title="Permanent link"></a></h3> <p>In some cases, it can be useful to build a docker image and publish such an image to a private or custom registry location.</p> <p>This can be done setting two environment variables, <code>REGISTRY</code> and <code>TAG</code></p> <div class=highlight><pre><span></span><code><span class=go>export TAG=&quot;dev&quot;</span> </code></pre></div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>The variable <code>FOCUS</code> defines Ginkgo <a href=https://onsi.github.io/ginkgo/#focused-specs>Focused Specs</a></p> </div> <p>Valid values are defined in the describe definition of the e2e tests like <a href=https://github.com/kubernetes/ingress-nginx/blob/main/test/e2e/defaultbackend/default_backend.go#L29>Default Backend</a></p> <p>The complete list of tests can be found <a href=e2e-tests.md>here</a></p> <h3 id=custom-docker-image>Custom docker image<a class=headerlink href=#custom-docker-image title="Permanent link"></a></h3> <p>In some cases, it can be useful to build a docker image and publish such an image to a private or custom registry location.</p> <p>This can be done setting two environment variables, <code>REGISTRY</code> and <code>TAG</code></p> <div class=highlight><pre><span></span><code><span class=go>export TAG=&quot;dev&quot;</span>
<span class=go>export REGISTRY=&quot;$USER&quot;</span> <span class=go>export REGISTRY=&quot;$USER&quot;</span>
<span class=go>make build image</span> <span class=go>make build image</span>

File diff suppressed because one or more lines are too long

View file

@ -12,7 +12,7 @@
<span class=go>openssl x509 -req -sha256 -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt</span> <span class=go>openssl x509 -req -sha256 -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt</span>
</code></pre></div> <p><strong>Generate the Client Key, and Certificate and Sign with the CA Certificate:</strong></p> <div class=highlight><pre><span></span><code><span class=go>openssl req -new -newkey rsa:4096 -keyout client.key -out client.csr -nodes -subj &#39;/CN=My Client&#39;</span> </code></pre></div> <p><strong>Generate the Client Key, and Certificate and Sign with the CA Certificate:</strong></p> <div class=highlight><pre><span></span><code><span class=go>openssl req -new -newkey rsa:4096 -keyout client.key -out client.csr -nodes -subj &#39;/CN=My Client&#39;</span>
<span class=go>openssl x509 -req -sha256 -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 02 -out client.crt</span> <span class=go>openssl x509 -req -sha256 -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 02 -out client.crt</span>
</code></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> <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, which you can deploy as follows</p> <div class=highlight><pre><span></span><code><span class=gp>$</span> kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/http-svc.yaml </code></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> <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, which you can deploy as follows</p> <div class=highlight><pre><span></span><code><span class=gp>$</span> kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/http-svc.yaml
<span class=go>service &quot;http-svc&quot; created</span> <span class=go>service &quot;http-svc&quot; created</span>
<span class=go>replicationcontroller &quot;http-svc&quot; created</span> <span class=go>replicationcontroller &quot;http-svc&quot; created</span>

View file

@ -6,7 +6,7 @@
<span class=nt>nginx.ingress.kubernetes.io/auth-signin</span><span class=p>:</span> <span class=s>&quot;https://$host/oauth2/start?rd=$escaped_request_uri&quot;</span> <span class=nt>nginx.ingress.kubernetes.io/auth-signin</span><span class=p>:</span> <span class=s>&quot;https://$host/oauth2/start?rd=$escaped_request_uri&quot;</span>
<span class=nn>...</span> <span class=nn>...</span>
</code></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> <p>This example will show you how to deploy <a href=https://github.com/pusher/oauth2_proxy><code>oauth2_proxy</code></a> 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> <ol> <li>Install the kubernetes dashboard</li> </ol> <div class=highlight><pre><span></span><code><span class=go>kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.10.1.yaml</span> </code></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> <p>This example will show you how to deploy <a href=https://github.com/pusher/oauth2_proxy><code>oauth2_proxy</code></a> 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> <ol> <li>Install the kubernetes dashboard</li> </ol> <div class=highlight><pre><span></span><code><span class=go>kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.10.1.yaml</span>
</code></pre></div> <ol> <li>Create a <a href=https://github.com/settings/applications/new>custom Github OAuth application</a></li> </ol> <p><img alt="Register OAuth2 Application" src=images/register-oauth-app.png></p> <ul> <li>Homepage URL is the FQDN in the Ingress rule, like <code>https://foo.bar.com</code></li> <li>Authorization callback URL is the same as the base FQDN plus <code>/oauth2/callback</code>, like <code>https://foo.bar.com/oauth2/callback</code></li> </ul> <p><img alt="Register OAuth2 Application" src=images/register-oauth-app-2.png></p> <ol> <li> <p>Configure oauth2_proxy values in the file <a href=https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml><code>oauth2-proxy.yaml</code></a> with the values:</p> </li> <li> <p>OAUTH2_PROXY_CLIENT_ID with the github <code>&lt;Client ID&gt;</code></p> </li> <li>OAUTH2_PROXY_CLIENT_SECRET with the github <code>&lt;Client Secret&gt;</code></li> <li> <p>OAUTH2_PROXY_COOKIE_SECRET with value of <code>python -c 'import os,base64; print(base64.b64encode(os.urandom(16)).decode("ascii"))'</code></p> </li> <li> <p>Customize the contents of the file <a href=https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/auth/oauth-external-auth/dashboard-ingress.yaml><code>dashboard-ingress.yaml</code></a>:</p> </li> </ol> <p>Replace <code>__INGRESS_HOST__</code> with a valid FQDN and <code>__INGRESS_SECRET__</code> with a Secret with a valid SSL certificate.</p> <ol> <li>Deploy the oauth2 proxy and the ingress rules running:</li> </ol> <div class=highlight><pre><span></span><code><span class=gp>$</span> kubectl create -f oauth2-proxy.yaml,dashboard-ingress.yaml </code></pre></div> <ol> <li>Create a <a href=https://github.com/settings/applications/new>custom Github OAuth application</a></li> </ol> <p><img alt="Register OAuth2 Application" src=images/register-oauth-app.png></p> <ul> <li>Homepage URL is the FQDN in the Ingress rule, like <code>https://foo.bar.com</code></li> <li>Authorization callback URL is the same as the base FQDN plus <code>/oauth2/callback</code>, like <code>https://foo.bar.com/oauth2/callback</code></li> </ul> <p><img alt="Register OAuth2 Application" src=images/register-oauth-app-2.png></p> <ol> <li> <p>Configure oauth2_proxy values in the file <a href=https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml><code>oauth2-proxy.yaml</code></a> with the values:</p> </li> <li> <p>OAUTH2_PROXY_CLIENT_ID with the github <code>&lt;Client ID&gt;</code></p> </li> <li>OAUTH2_PROXY_CLIENT_SECRET with the github <code>&lt;Client Secret&gt;</code></li> <li> <p>OAUTH2_PROXY_COOKIE_SECRET with value of <code>python -c 'import os,base64; print(base64.b64encode(os.urandom(16)).decode("ascii"))'</code></p> </li> <li> <p>Customize the contents of the file <a href=https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/auth/oauth-external-auth/dashboard-ingress.yaml><code>dashboard-ingress.yaml</code></a>:</p> </li> </ol> <p>Replace <code>__INGRESS_HOST__</code> with a valid FQDN and <code>__INGRESS_SECRET__</code> with a Secret with a valid SSL certificate.</p> <ol> <li>Deploy the oauth2 proxy and the ingress rules running:</li> </ol> <div class=highlight><pre><span></span><code><span class=gp>$</span> kubectl create -f oauth2-proxy.yaml,dashboard-ingress.yaml
</code></pre></div> <p>Test the oauth integration accessing the configured URL, like <code>https://foo.bar.com</code></p> <p><img alt="Register OAuth2 Application" src=images/github-auth.png></p> <p><img alt="Github authentication" src=images/oauth-login.png></p> <p><img alt="Kubernetes dashboard" src=images/dashboard.png></p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../external-auth/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> External Basic Authentication </div> </div> </a> <a href=../../customization/configuration-snippets/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Configuration Snippets </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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> </code></pre></div> <p>Test the oauth integration accessing the configured URL, like <code>https://foo.bar.com</code></p> <p><img alt="Register OAuth2 Application" src=images/github-auth.png></p> <p><img alt="Github authentication" src=images/oauth-login.png></p> <p><img alt="Kubernetes dashboard" src=images/dashboard.png></p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../external-auth/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> External Basic Authentication </div> </div> </a> <a href=../../customization/configuration-snippets/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Configuration Snippets </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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>
app = initialize({ app = initialize({
base: "../../..", base: "../../..",

View file

@ -7,7 +7,7 @@ data:
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: ingress-nginx-controller name: ingress-nginx-controller
</code></pre></div> <div class=highlight><pre><span></span><code>curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-configuration/configmap.yaml \ </code></pre></div> <div class=highlight><pre><span></span><code>curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/customization/custom-configuration/configmap.yaml \
| kubectl apply -f - | kubectl apply -f -
</code></pre></div> <p>If the Configmap is updated, NGINX will be reloaded with the new configuration.</p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../configuration-snippets/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Configuration Snippets </div> </div> </a> <a href=../custom-errors/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Custom Errors </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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> </code></pre></div> <p>If the Configmap is updated, NGINX will be reloaded with the new configuration.</p> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../configuration-snippets/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Configuration Snippets </div> </div> </a> <a href=../custom-errors/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Custom Errors </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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>
app = initialize({ app = initialize({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -103,13 +103,13 @@ spec:
- foo.bar.com - foo.bar.com
# This secret must exist beforehand # This secret must exist beforehand
# The cert must also contain the subj-name foo.bar.com # The cert must also contain the subj-name foo.bar.com
# https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/PREREQUISITES.md#tls-certificates # https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/PREREQUISITES.md#tls-certificates
secretName: foobar secretName: foobar
- hosts: - hosts:
- bar.baz.com - bar.baz.com
# This secret must exist beforehand # This secret must exist beforehand
# The cert must also contain the subj-name bar.baz.com # The cert must also contain the subj-name bar.baz.com
# https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/PREREQUISITES.md#tls-certificates # https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/PREREQUISITES.md#tls-certificates
secretName: barbaz secretName: barbaz
rules: rules:
- host: foo.bar.com - host: foo.bar.com

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,207 +1,207 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>https://kubernetes.github.io/ingress-nginx/</loc> <loc>https://kubernetes.github.io/ingress-nginx/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/how-it-works/</loc> <loc>https://kubernetes.github.io/ingress-nginx/how-it-works/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/troubleshooting/</loc> <loc>https://kubernetes.github.io/ingress-nginx/troubleshooting/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/kubectl-plugin/</loc> <loc>https://kubernetes.github.io/ingress-nginx/kubectl-plugin/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/baremetal/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/baremetal/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/rbac/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/rbac/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/upgrade/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/upgrade/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/hardening-guide/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/hardening-guide/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/cli-arguments/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/cli-arguments/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/default-backend/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/default-backend/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/external-articles/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/external-articles/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/monitoring/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/monitoring/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/tls/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/tls/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/modsecurity/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/modsecurity/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/opentracing/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/opentracing/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/PREREQUISITES/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/PREREQUISITES/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/basic/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/basic/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/client-certs/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/client-certs/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/external-auth/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/external-auth/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/configuration-snippets/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/configuration-snippets/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-configuration/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-configuration/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-headers/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-headers/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/external-auth-headers/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/external-auth-headers/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/ssl-dh-param/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/ssl-dh-param/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/sysctl/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/sysctl/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/docker-registry/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/docker-registry/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/grpc/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/grpc/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/multi-tls/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/multi-tls/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/rewrite/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/rewrite/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/static-ip/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/static-ip/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/tls-termination/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/tls-termination/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/psp/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/psp/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/developer-guide/getting-started/</loc> <loc>https://kubernetes.github.io/ingress-nginx/developer-guide/getting-started/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/developer-guide/code-overview/</loc> <loc>https://kubernetes.github.io/ingress-nginx/developer-guide/code-overview/</loc>
<lastmod>2021-08-06</lastmod> <lastmod>2021-08-07</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -31,7 +31,7 @@ ports:
- name: prometheus - name: prometheus
containerPort: 10254 containerPort: 10254
.. ..
</code></pre></div></p> </li> </ul> </li> </ul> <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>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> <ul> <li> <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> </li> <li> <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> </li> <li> <p>Running the following command deploys prometheus in Kubernetes:</p> </li> </ul> <div class=highlight><pre><span></span><code>kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/ </code></pre></div></p> </li> </ul> </li> </ul> <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>Note that the kustomize bases used in this tutorial are stored in the <a href=https://github.com/kubernetes/ingress-nginx/tree/main/deploy>deploy</a> folder of the GitHub repository <a href=https://github.com/kubernetes/ingress-nginx>kubernetes/ingress-nginx</a>.</p> <ul> <li> <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> </li> <li> <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> </li> <li> <p>Running the following command deploys prometheus in Kubernetes:</p> </li> </ul> <div class=highlight><pre><span></span><code>kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/
</code></pre></div> <h3 id=prometheus-dashboard>Prometheus Dashboard<a class=headerlink href=#prometheus-dashboard title="Permanent link"></a></h3> <ul> <li>Open Prometheus dashboard in a web browser:</li> </ul> <div class=highlight><pre><span></span><code><span class=go>kubectl get svc -n ingress-nginx</span> </code></pre></div> <h3 id=prometheus-dashboard>Prometheus Dashboard<a class=headerlink href=#prometheus-dashboard title="Permanent link"></a></h3> <ul> <li>Open Prometheus dashboard in a web browser:</li> </ul> <div class=highlight><pre><span></span><code><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>
<span class=go>default-http-backend ClusterIP 10.103.59.201 &lt;none&gt; 80/TCP 3d</span> <span class=go>default-http-backend ClusterIP 10.103.59.201 &lt;none&gt; 80/TCP 3d</span>
@ -47,7 +47,7 @@ default-http-backend ClusterIP 10.103.59.201 &lt;none&gt; 80/TCP
ingress-nginx NodePort 10.97.44.72 &lt;none&gt; 80:30100/TCP,443:30154/TCP,10254:32049/TCP 5h ingress-nginx NodePort 10.97.44.72 &lt;none&gt; 80:30100/TCP,443:30154/TCP,10254:32049/TCP 5h
prometheus-server NodePort 10.98.233.86 &lt;none&gt; 9090:32630/TCP 10m prometheus-server NodePort 10.98.233.86 &lt;none&gt; 9090:32630/TCP 10m
grafana NodePort 10.98.233.87 &lt;none&gt; 3000:31086/TCP 10m grafana NodePort 10.98.233.87 &lt;none&gt; 3000:31086/TCP 10m
</code></pre></div></p> </li> <li> <p>Open your browser and visit the following URL: <em>http://{node IP address}:{grafana-svc-nodeport}</em> to load the Grafana Dashboard. According to the above example, this URL will be http://10.192.0.3:31086</p> </li> </ul> <p>The username and password is <code>admin</code></p> <ul> <li> <p>After the login you can import the Grafana dashboard from <a href=https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards>official dashboards</a>, by following steps given below :</p> <ul> <li>Navigate to lefthand panel of grafana</li> <li>Hover on the gearwheel icon for Configuration and click "Data Sources"</li> <li>Click "Add data source"</li> <li>Select "Prometheus"</li> <li>Enter the details (note: I used http://CLUSTER_IP_PROMETHEUS_SVC:9090)</li> <li>Left menu (hover over +) -&gt; Dashboard</li> <li>Click "Import"</li> <li>Enter the copy pasted json from https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/grafana/dashboards/nginx.json</li> <li>Click Import JSON</li> <li>Select the Prometheus data source</li> <li>Click "Import"</li> </ul> </li> </ul> <p><img alt="Grafana Dashboard" src=../../images/grafana.png></p> <h2 id=caveats>Caveats<a class=headerlink href=#caveats title="Permanent link"></a></h2> <h3 id=wildcard-ingresses>Wildcard ingresses<a class=headerlink href=#wildcard-ingresses title="Permanent link"></a></h3> <ul> <li>By default request metrics are labeled with the hostname. When you have a wildcard domain ingress, then there will be no metrics for that ingress (to prevent the metrics from exploding in cardinality). To get metrics in this case you need to run the ingress controller with <code>--metrics-per-host=false</code> (you will lose labeling by hostname, but still have labeling by ingress).</li> </ul> <h2 id=grafana-dashboard-using-ingress-resource>Grafana dashboard using ingress resource<a class=headerlink href=#grafana-dashboard-using-ingress-resource title="Permanent link"></a></h2> <ul> <li>If you want to expose the dashboard for grafana using a ingress resource, then you can : <ul> <li>change the service type of the prometheus-server service and the grafana service to "ClusterIP" like this : <div class=highlight><pre><span></span><code>kubectl -n ingress-nginx edit svc grafana </code></pre></div></p> </li> <li> <p>Open your browser and visit the following URL: <em>http://{node IP address}:{grafana-svc-nodeport}</em> to load the Grafana Dashboard. According to the above example, this URL will be http://10.192.0.3:31086</p> </li> </ul> <p>The username and password is <code>admin</code></p> <ul> <li> <p>After the login you can import the Grafana dashboard from <a href=https://github.com/kubernetes/ingress-nginx/tree/main/deploy/grafana/dashboards>official dashboards</a>, by following steps given below :</p> <ul> <li>Navigate to lefthand panel of grafana</li> <li>Hover on the gearwheel icon for Configuration and click "Data Sources"</li> <li>Click "Add data source"</li> <li>Select "Prometheus"</li> <li>Enter the details (note: I used http://CLUSTER_IP_PROMETHEUS_SVC:9090)</li> <li>Left menu (hover over +) -&gt; Dashboard</li> <li>Click "Import"</li> <li>Enter the copy pasted json from https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/grafana/dashboards/nginx.json</li> <li>Click Import JSON</li> <li>Select the Prometheus data source</li> <li>Click "Import"</li> </ul> </li> </ul> <p><img alt="Grafana Dashboard" src=../../images/grafana.png></p> <h2 id=caveats>Caveats<a class=headerlink href=#caveats title="Permanent link"></a></h2> <h3 id=wildcard-ingresses>Wildcard ingresses<a class=headerlink href=#wildcard-ingresses title="Permanent link"></a></h3> <ul> <li>By default request metrics are labeled with the hostname. When you have a wildcard domain ingress, then there will be no metrics for that ingress (to prevent the metrics from exploding in cardinality). To get metrics in this case you need to run the ingress controller with <code>--metrics-per-host=false</code> (you will lose labeling by hostname, but still have labeling by ingress).</li> </ul> <h2 id=grafana-dashboard-using-ingress-resource>Grafana dashboard using ingress resource<a class=headerlink href=#grafana-dashboard-using-ingress-resource title="Permanent link"></a></h2> <ul> <li>If you want to expose the dashboard for grafana using a ingress resource, then you can : <ul> <li>change the service type of the prometheus-server service and the grafana service to "ClusterIP" like this : <div class=highlight><pre><span></span><code>kubectl -n ingress-nginx edit svc grafana
</code></pre></div></li> <li>This will open the currently deployed service grafana in the default editor configured in your shell (vi/nvim/nano/other)</li> <li>scroll down to line 34 that looks like "type: NodePort"</li> <li>change it to look like "type: ClusterIP". Save and exit.</li> <li>create a ingress reource with backend as "grafana" and port as "3000"</li> </ul> </li> <li>Similarly, you can edit the service "prometheus-server" and add a ingress resource.</li> </ul> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../miscellaneous/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Miscellaneous </div> </div> </a> <a href=../multiple-ingress/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Multiple Ingress controllers </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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> </code></pre></div></li> <li>This will open the currently deployed service grafana in the default editor configured in your shell (vi/nvim/nano/other)</li> <li>scroll down to line 34 that looks like "type: NodePort"</li> <li>change it to look like "type: ClusterIP". Save and exit.</li> <li>create a ingress reource with backend as "grafana" and port as "3000"</li> </ul> </li> <li>Similarly, you can edit the service "prometheus-server" and add a ingress resource.</li> </ul> </article> </div> </div> </main> <footer class=md-footer> <div class=md-footer-nav> <nav class="md-footer-nav__inner md-grid" aria-label=Footer> <a href=../miscellaneous/ class="md-footer-nav__link md-footer-nav__link--prev" rel=prev> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Previous </span> Miscellaneous </div> </div> </a> <a href=../multiple-ingress/ class="md-footer-nav__link md-footer-nav__link--next" rel=next> <div class=md-footer-nav__title> <div class=md-ellipsis> <span class=md-footer-nav__direction> Next </span> Multiple Ingress controllers </div> </div> <div class="md-footer-nav__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="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> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> </div> </div> </footer> </div> <script src=../../assets/javascripts/vendor.93c04032.min.js></script> <script src=../../assets/javascripts/bundle.83e5331e.min.js></script><script id=__lang type=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>
app = initialize({ app = initialize({
base: "../..", base: "../..",

File diff suppressed because one or more lines are too long