Skip to content

Commit 0158f5d

Browse files
authored
fix ordering in NIC policy doc (#1147)
fix: policy order
1 parent f6fb43e commit 0158f5d

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

content/nic/configuration/policy-resource.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -793,29 +793,6 @@ The feature is implemented using the NGINX [ngx_http_proxy_module](https://nginx
793793

794794
A VirtualServer/VirtualServerRoute can reference multiple cache policies. However, only one can be applied: every subsequent reference will be ignored.
795795

796-
## Using Policy
797-
798-
You can use the usual `kubectl` commands to work with Policy resources, just as with built-in Kubernetes resources.
799-
800-
For example, the following command creates a Policy resource defined in `access-control-policy-allow.yaml` with the name `webapp-policy`:
801-
802-
```shell
803-
kubectl apply -f access-control-policy-allow.yaml
804-
805-
policy.k8s.nginx.org/webapp-policy configured
806-
```
807-
808-
You can get the resource by running:
809-
810-
```shell
811-
kubectl get policy webapp-policy
812-
813-
NAME AGE
814-
webapp-policy 27m
815-
```
816-
817-
For `kubectl get` and similar commands, you can also use the short name `pol` instead of `policy`.
818-
819796
### WAF
820797

821798
{{< call-out "note" >}} The feature is implemented using the NGINX Plus [NGINX App Protect WAF Module]({{< ref "/nap-waf/" >}}). {{< /call-out >}}
@@ -863,6 +840,29 @@ policies:
863840

864841
In this example NGINX Ingress Controller will use the configuration from the first policy reference `waf-policy-one`, and ignores `waf-policy-two`.
865842

843+
## Using Policy
844+
845+
You can use the usual `kubectl` commands to work with Policy resources, just as with built-in Kubernetes resources.
846+
847+
For example, the following command creates a Policy resource defined in `access-control-policy-allow.yaml` with the name `webapp-policy`:
848+
849+
```shell
850+
kubectl apply -f access-control-policy-allow.yaml
851+
852+
policy.k8s.nginx.org/webapp-policy configured
853+
```
854+
855+
You can get the resource by running:
856+
857+
```shell
858+
kubectl get policy webapp-policy
859+
860+
NAME AGE
861+
webapp-policy 27m
862+
```
863+
864+
For `kubectl get` and similar commands, you can also use the short name `pol` instead of `policy`.
865+
866866
### Applying Policies
867867

868868
You can apply policies to both VirtualServer and VirtualServerRoute resources. For example:

0 commit comments

Comments
 (0)