From 49ea9bd49bb4955ee66c26771a904949e68837e1 Mon Sep 17 00:00:00 2001 From: k8s-ci-robot Date: Tue, 9 Nov 2021 15:45:04 +0000 Subject: [PATCH] Deploy GitHub Pages --- examples/affinity/cookie/ingress-samesite.yaml | 4 +++- examples/affinity/cookie/ingress.yaml | 1 + examples/auth/basic/index.html | 1 + examples/auth/client-certs/ingress.yaml | 1 + examples/auth/external-auth/ingress.yaml | 3 ++- .../oauth-external-auth/dashboard-ingress.yaml | 2 ++ examples/chashsubset/deployment.yaml | 2 +- .../configuration-snippets/ingress.yaml | 1 + .../deploy/echo-service.yaml | 2 ++ examples/docker-registry/ingress-with-tls.yaml | 3 ++- .../docker-registry/ingress-without-tls.yaml | 3 ++- examples/grpc/index.html | 4 ++-- examples/index.html | 2 +- examples/multi-tls/multi-tls.yaml | 1 + examples/rewrite/index.html | 2 ++ examples/static-ip/nginx-ingress.yaml | 1 + examples/tls-termination/index.html | 3 ++- examples/tls-termination/ingress.yaml | 1 + search/search_index.json | 2 +- sitemap.xml.gz | Bin 710 -> 710 bytes user-guide/basic-usage/index.html | 8 +++----- user-guide/fcgi-services/index.html | 2 +- user-guide/ingress-path-matching/index.html | 4 ++++ .../third-party-addons/opentracing/index.html | 1 + 24 files changed, 38 insertions(+), 16 deletions(-) diff --git a/examples/affinity/cookie/ingress-samesite.yaml b/examples/affinity/cookie/ingress-samesite.yaml index d03a25e39..2f7022ef7 100644 --- a/examples/affinity/cookie/ingress-samesite.yaml +++ b/examples/affinity/cookie/ingress-samesite.yaml @@ -11,6 +11,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-samesite: "None" nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none: "true" # omits SameSite=None for older browsers which reject cookies with SameSite=None spec: + ingressClassName: nginx rules: - host: stickyingress-samesite-none.example.com http: @@ -34,6 +35,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" nginx.ingress.kubernetes.io/session-cookie-samesite: "Strict" spec: + ingressClassName: nginx rules: - host: stickyingress-samesite-strict.example.com http: @@ -44,4 +46,4 @@ spec: service: name: http-svc port: - number: 80 \ No newline at end of file + number: 80 diff --git a/examples/affinity/cookie/ingress.yaml b/examples/affinity/cookie/ingress.yaml index d3053021e..4ca9fbc09 100644 --- a/examples/affinity/cookie/ingress.yaml +++ b/examples/affinity/cookie/ingress.yaml @@ -9,6 +9,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" spec: + ingressClassName: nginx rules: - host: stickyingress.example.com http: diff --git a/examples/auth/basic/index.html b/examples/auth/basic/index.html index b94f70be5..c1a24f46e 100644 --- a/examples/auth/basic/index.html +++ b/examples/auth/basic/index.html @@ -27,6 +27,7 @@ # message to display with an appropriate context why the authentication is required nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - foo' spec: + ingressClassName: nginx rules: - host: foo.bar.com http: diff --git a/examples/auth/client-certs/ingress.yaml b/examples/auth/client-certs/ingress.yaml index 90ff87514..0cd56fcbf 100644 --- a/examples/auth/client-certs/ingress.yaml +++ b/examples/auth/client-certs/ingress.yaml @@ -15,6 +15,7 @@ metadata: name: nginx-test namespace: default spec: + ingressClassName: nginx rules: - host: mydomain.com http: diff --git a/examples/auth/external-auth/ingress.yaml b/examples/auth/external-auth/ingress.yaml index df80cbb25..1aa2f36e9 100644 --- a/examples/auth/external-auth/ingress.yaml +++ b/examples/auth/external-auth/ingress.yaml @@ -5,6 +5,7 @@ metadata: nginx.ingress.kubernetes.io/auth-url: "https://httpbin.org/basic-auth/user/passwd" name: external-auth spec: + ingressClassName: nginx rules: - host: external-auth-01.sample.com http: @@ -15,4 +16,4 @@ spec: service: name: http-svc port: - number: 80 \ No newline at end of file + number: 80 diff --git a/examples/auth/oauth-external-auth/dashboard-ingress.yaml b/examples/auth/oauth-external-auth/dashboard-ingress.yaml index 4c0a2d373..198a165f4 100644 --- a/examples/auth/oauth-external-auth/dashboard-ingress.yaml +++ b/examples/auth/oauth-external-auth/dashboard-ingress.yaml @@ -7,6 +7,7 @@ metadata: name: external-auth-oauth2 namespace: kube-system spec: + ingressClassName: nginx rules: - host: __INGRESS_HOST__ http: @@ -26,6 +27,7 @@ metadata: name: oauth2-proxy namespace: kube-system spec: + ingressClassName: nginx rules: - host: __INGRESS_HOST__ http: diff --git a/examples/chashsubset/deployment.yaml b/examples/chashsubset/deployment.yaml index 867cd01c0..0ac13fcce 100644 --- a/examples/chashsubset/deployment.yaml +++ b/examples/chashsubset/deployment.yaml @@ -64,6 +64,7 @@ metadata: name: nginxhello-ingress namespace: default spec: + ingressClassName: nginx rules: - host: foo.bar.com http: @@ -75,4 +76,3 @@ spec: name: nginxhello port: number: 80 - diff --git a/examples/customization/configuration-snippets/ingress.yaml b/examples/customization/configuration-snippets/ingress.yaml index aaf31f0bb..1f0c4f24a 100644 --- a/examples/customization/configuration-snippets/ingress.yaml +++ b/examples/customization/configuration-snippets/ingress.yaml @@ -6,6 +6,7 @@ metadata: nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers "Request-Id: $req_id"; spec: + ingressClassName: nginx rules: - host: custom.configuration.com http: diff --git a/examples/customization/external-auth-headers/deploy/echo-service.yaml b/examples/customization/external-auth-headers/deploy/echo-service.yaml index 3a80ae834..9881ac8d0 100644 --- a/examples/customization/external-auth-headers/deploy/echo-service.yaml +++ b/examples/customization/external-auth-headers/deploy/echo-service.yaml @@ -52,6 +52,7 @@ metadata: nginx.ingress.kubernetes.io/auth-response-headers: UserID, UserRole namespace: default spec: + ingressClassName: nginx rules: - host: public-demo-echo-service.kube.local http: @@ -73,6 +74,7 @@ metadata: nginx.ingress.kubernetes.io/auth-response-headers: UserID, UserRole namespace: default spec: + ingressClassName: nginx rules: - host: secure-demo-echo-service.kube.local http: diff --git a/examples/docker-registry/ingress-with-tls.yaml b/examples/docker-registry/ingress-with-tls.yaml index bef35c50b..1bdd9ed7a 100644 --- a/examples/docker-registry/ingress-with-tls.yaml +++ b/examples/docker-registry/ingress-with-tls.yaml @@ -9,6 +9,7 @@ metadata: name: docker-registry namespace: docker-registry spec: + ingressClassName: nginx tls: - hosts: - registry. @@ -23,4 +24,4 @@ spec: service: name: docker-registry port: - number: 5000 \ No newline at end of file + number: 5000 diff --git a/examples/docker-registry/ingress-without-tls.yaml b/examples/docker-registry/ingress-without-tls.yaml index f64cbb295..d0ffc8baf 100644 --- a/examples/docker-registry/ingress-without-tls.yaml +++ b/examples/docker-registry/ingress-without-tls.yaml @@ -8,6 +8,7 @@ metadata: name: docker-registry namespace: docker-registry spec: + ingressClassName: nginx rules: - host: registry. http: @@ -18,4 +19,4 @@ spec: service: name: docker-registry port: - number: 5000 + number: 5000 \ No newline at end of file diff --git a/examples/grpc/index.html b/examples/grpc/index.html index d7cced5cc..2dd9e0249 100644 --- a/examples/grpc/index.html +++ b/examples/grpc/index.html @@ -1,5 +1,5 @@ gRPC - NGINX Ingress Controller
Skip to content

gRPC

This example demonstrates how to route traffic to a gRPC service through the nginx controller.

Prerequisites

  1. You have a kubernetes cluster running.
  2. You have a domain name such as example.com that is configured to route traffic to the ingress controller.
  3. You have the nginx-ingress controller installed as per docs.
  4. You have a backend application running a gRPC server and listening for TCP traffic. If you want, you can use https://github.com/grpc/grpc-go/blob/91e0aeb192456225adf27966d04ada4cf8599915/examples/features/reflection/server/main.go as an example.
  5. You're also responsible for provisioning an SSL certificate for the ingress. So you need to have a valid SSL certificate, deployed as a Kubernetes secret of type tls, in the same namespace as the gRPC application.

Step 1: Create a Kubernetes Deployment for gRPC app

  • Make sure your gRPC application pod is running and listening for connections. For example you can try a kubectl command like this below:
    $ kubectl get po -A -o wide | grep go-grpc-greeter-server
    -
  • If you have a gRPC app deployed in your cluster, then skip further notes in this Step 1, and continue from Step 2 below.

  • As an example gRPC application, we can use this app https://github.com/grpc/grpc-go/blob/91e0aeb192456225adf27966d04ada4cf8599915/examples/features/reflection/server/main.go .

  • To create a container image for this app, you can use this Dockerfile.

  • If you use the Dockerfile mentioned above, to create a image, then given below is an example of a Kubernetes manifest, to create a deployment resource, that uses that image. If needed, then edit this manifest to suit your needs. Assuming the name of this yaml file is deployment.go-grpc-greeter-server.yaml ;

cat <<EOF | kubectl apply -f -
+
  • If you have a gRPC app deployed in your cluster, then skip further notes in this Step 1, and continue from Step 2 below.

  • As an example gRPC application, we can use this app https://github.com/grpc/grpc-go/blob/91e0aeb192456225adf27966d04ada4cf8599915/examples/features/reflection/server/main.go .

  • To create a container image for this app, you can use this Dockerfile.

  • If you use the Dockerfile mentioned above, to create a image, then given below is an example of a Kubernetes manifest, to create a deployment resource, that uses that image. If needed, then edit this manifest to suit your needs. Assuming the name of this yaml file is deployment.go-grpc-greeter-server.yaml ;

  • cat <<EOF | kubectl apply -f -
     apiVersion: apps/v1
     kind: Deployment
     metadata:
    @@ -51,12 +51,12 @@ apiVersion: networking.k8s.io/v1
     kind: Ingress
     metadata:
       annotations:
    -    kubernetes.io/ingress.class: "nginx"
         nginx.ingress.kubernetes.io/ssl-redirect: "true"
         nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
       name: fortune-ingress
       namespace: default
     spec:
    +  ingressClassName: nginx
       rules:
       - host: grpctest.dev.mydomain.com
         http:
    diff --git a/examples/index.html b/examples/index.html
    index 3150133c6..14fd11813 100644
    --- a/examples/index.html
    +++ b/examples/index.html
    @@ -1,4 +1,4 @@
    - Introduction - NGINX Ingress Controller      

    Ingress examples

    This directory contains a catalog of examples on how to run, configure and scale Ingress.
    Please review the prerequisites before trying them.

    Category Name Description Complexity Level
    Apps Docker Registry TODO TODO
    Auth Basic authentication password protect your website Intermediate
    Auth Client certificate authentication secure your website with client certificate authentication Intermediate
    Auth External authentication plugin defer to an external authentication service Intermediate
    Auth OAuth external auth TODO TODO
    Customization Configuration snippets customize nginx location configuration using annotations Advanced
    Customization Custom configuration TODO TODO
    Customization Custom DH parameters for perfect forward secrecy TODO TODO
    Customization Custom errors serve custom error pages from the default backend Intermediate
    Customization Custom headers set custom headers before sending traffic to backends Advanced
    Customization External authentication with response header propagation TODO TODO
    Customization Sysctl tuning TODO TODO
    Features Rewrite TODO TODO
    Features Session stickiness route requests consistently to the same endpoint Advanced
    Scaling Static IP a single ingress gets a single static IP Intermediate
    TLS Multi TLS certificate termination TODO TODO
    TLS TLS termination TODO TODO

    Ingress examples

    This directory contains a catalog of examples on how to run, configure and scale Ingress. Please review the prerequisites before trying them.

    The examples on these pages include the spec.ingressClassName field which replaces the deprecated kubernetes.io/ingress.class: nginx annotation. Users of ingress-nginx < 1.0.0 (Helm chart < 4.0.0) should use the legacy documentation.

    For more information, check out the Migration to apiVersion networking.k8s.io/v1 guide.

    Category Name Description Complexity Level
    Apps Docker Registry TODO TODO
    Auth Basic authentication password protect your website Intermediate
    Auth Client certificate authentication secure your website with client certificate authentication Intermediate
    Auth External authentication plugin defer to an external authentication service Intermediate
    Auth OAuth external auth TODO TODO
    Customization Configuration snippets customize nginx location configuration using annotations Advanced
    Customization Custom configuration TODO TODO
    Customization Custom DH parameters for perfect forward secrecy TODO TODO
    Customization Custom errors serve custom error pages from the default backend Intermediate
    Customization Custom headers set custom headers before sending traffic to backends Advanced
    Customization External authentication with response header propagation TODO TODO
    Customization Sysctl tuning TODO TODO
    Features Rewrite TODO TODO
    Features Session stickiness route requests consistently to the same endpoint Advanced
    Scaling Static IP a single ingress gets a single static IP Intermediate
    TLS Multi TLS certificate termination TODO TODO
    TLS TLS termination TODO TODO