Skip to content

Commit

Permalink
Update document to shift the subject focus the Policy object
Browse files Browse the repository at this point in the history
  • Loading branch information
ADubhlaoich committed Oct 21, 2024
1 parent aed5fbd commit 0825f18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/custom-resources/access-control/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Deploy an Access Control policy
# Deploy a Policy for access control

This is the example code used in the [Deploy an Access Control policy](https://docs.nginx.com/nginx-ingress-controller/configuration/access-control/) documentation.
This is the example code used in the [Deploy a Policy for access control](https://docs.nginx.com/nginx-ingress-controller/configuration/access-control/) documentation.
16 changes: 7 additions & 9 deletions site/content/configuration/access-control.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
title: Deploy an Access Control policy
title: Deploy a Policy for access control
weight: 900
toc: true
docs: DOCS-000
---

This topic describes how to apply and update an Access Control policy with F5 NGINX Ingress Controller.

It demonstrates this using an example application and a [VirtualServer custom resource]({{< ref "/configuration/virtualserver-and-virtualserverroute-resources.md" >}})
This topic describes how to use F5 NGINX Ingress Controller to apply and update a Policy for access control. It demonstrates it using an example application and a [VirtualServer custom resource]({{< ref "/configuration/virtualserver-and-virtualserverroute-resources.md" >}}).

---

Expand Down Expand Up @@ -45,7 +43,7 @@ kubectl apply -f webapp.yaml

---

## Deploy an Access Control policy
## Deploy a Policy to create a deny rule

Create a file named _access-control-policy-deny.yaml_. The highlighted _deny_ field will be used by the example application, and should be changed to the subnet of your machine.

Expand Down Expand Up @@ -93,21 +91,21 @@ The *403* response is expected, successfully blocking your machine.

---

## Update the policy
## Update the Policy to create an allow rule

Create a new policy with the file _access-control-policy-allow.yaml_, updating the _allow_ field to the subnet of your machine.
Update the Policy with the file _access-control-policy-allow.yaml_, setting the _allow_ field to the subnet of your machine.

{{< ghcode "https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/access-control-policy-allow.yaml" "hl_lines=7-8" >}}

Apply the policy:
Apply the Policy:

```shell
kubectl apply -f access-control-policy-allow.yaml
```

----

## Verify the policy update
## Verify the Policy update

Attempt to access the application again:

Expand Down

0 comments on commit 0825f18

Please sign in to comment.