You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/custom-resources/rate-limit-tiered-apikey/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ limit Policies, grouped in a tier, using the API Key client name as the key to t
15
15
IC_IP=XXX.YYY.ZZZ.III
16
16
```
17
17
<!-- markdownlint-disable MD029 -->
18
-
3. Save the HTTP port of the Ingress Controller into a shell variable:
18
+
3. Save the HTTP port of NGINX Ingress Controller into a shell variable:
19
19
<!-- markdownlint-enable MD029 -->
20
20
```shell
21
21
IC_HTTP_PORT=<port number>
@@ -29,34 +29,34 @@ Create the application deployments and services:
29
29
kubectl apply -f coffee.yaml
30
30
```
31
31
32
-
## Deploy the Rate Limit Policies
32
+
## Deploy the rate limit Policies
33
33
34
34
In this step, we create three Policies:
35
35
36
-
-one with the name `api-key-policy` which defines the API Key Policy
37
-
-one with the name `rate-limit-apikey-premium`, that allows 5 requests per second coming from a request containing an API Key with a client name that ends with `premium`
38
-
-one with the name `rate-limit-apikey-basic` that allows 1 request per second coming from a request containing an API Key with a client name that ends with `basic`
36
+
-`api-key-policy` which defines the API Key Policy
37
+
-`rate-limit-apikey-premium`, that allows 5 requests per second coming from a request containing an API Key with a client name that ends with `premium`
38
+
-`rate-limit-apikey-basic` that allows 1 request per second coming from a request containing an API Key with a client name that ends with `basic`
39
39
40
40
The `rate-limit-apikey-basic` Policy is also the default policy if the API Key client name does not match a tier.
41
41
42
-
Create the policies:
42
+
Create the Policies:
43
43
44
44
```shell
45
45
kubectl apply -f api-key-policy.yaml
46
46
kubectl apply -f rate-limits.yaml
47
47
```
48
48
49
-
## Deploy the API Key Secret
49
+
## Deploy the API key authentication Secret
50
50
51
-
Create a secret of type `nginx.org/apikey` with the name `api-key-client-secret` that will be used for authorization on the server level.
51
+
Create a Secret of type `nginx.org/apikey` with the name `api-key-client-secret` that will be used for authorization on the server level.
52
52
53
-
This secret will contain a mapping of client names to base64 encoded API Keys.
53
+
This Secret will contain a mapping of client names to base64 encoded API Keys.
54
54
55
55
```shell
56
56
kubectl apply -f api-key-secret.yaml
57
57
```
58
58
59
-
## Configure Load Balancing
59
+
## Configure load balancing
60
60
61
61
Create a VirtualServer resource for the web application:
Copy file name to clipboardExpand all lines: examples/custom-resources/rate-limit-tiered-request-method/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ limit Policies, grouped in a tier, using the client IP address as the key to the
13
13
IC_IP=XXX.YYY.ZZZ.III
14
14
```
15
15
<!-- markdownlint-disable MD029 -->
16
-
3. Save the HTTP port of the Ingress Controller into a shell variable:
16
+
3. Save the HTTP port of NGINX Ingress Controller into a shell variable:
17
17
<!-- markdownlint-enable MD029 -->
18
18
```shell
19
19
IC_HTTP_PORT=<port number>
@@ -27,22 +27,22 @@ Create the application deployments and services:
27
27
kubectl apply -f coffee.yaml
28
28
```
29
29
30
-
## Deploy the Rate Limit Policies
30
+
## Deploy the rate limit Policies
31
31
32
32
In this step, we create two Policies:
33
33
34
-
-one with the name `rate-limit-request-method-get-head`, that allows 5 requests per second coming from a request containing the `GET` or `HEAD` request methods.
35
-
-one with the name `rate-limit-request-method-put-post-patch-delete` that allows 1 request per second coming from a request containing the `POST`, `PUT`, `PATCH` or `DELETE` request methods.
34
+
-`rate-limit-request-method-get-head`, that allows 5 requests per second coming from a request containing the `GET` or `HEAD` request methods.
35
+
-`rate-limit-request-method-put-post-patch-delete` that allows 1 request per second coming from a request containing the `POST`, `PUT`, `PATCH` or `DELETE` request methods.
36
36
37
-
The `rate-limit-request-method-put-post-patch-delete` Policy is also the default policy if the request method does not match a tier.
37
+
The `rate-limit-request-method-put-post-patch-delete` Policy is also the default Policy if the request method does not match a tier.
38
38
39
-
Create the policies:
39
+
Create the Policies:
40
40
41
41
```shell
42
42
kubectl apply -f rate-limits.yaml
43
43
```
44
44
45
-
## Configure Load Balancing
45
+
## Configure load balancing
46
46
47
47
Create a VirtualServer resource for the web application:
0 commit comments