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: content/nic/configuration/policy-resource.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -793,29 +793,6 @@ The feature is implemented using the NGINX [ngx_http_proxy_module](https://nginx
793
793
794
794
A VirtualServer/VirtualServerRoute can reference multiple cache policies. However, only one can be applied: every subsequent reference will be ignored.
795
795
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
-
819
796
### WAF
820
797
821
798
{{< 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:
863
840
864
841
In this example NGINX Ingress Controller will use the configuration from the first policy reference `waf-policy-one`, and ignores `waf-policy-two`.
865
842
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
+
866
866
### Applying Policies
867
867
868
868
You can apply policies to both VirtualServer and VirtualServerRoute resources. For example:
0 commit comments