Merge pull request #4238 from ahmetb/netpolicy-apigroup
Use correct apigroup for NetworkPolicy
This commit is contained in:
@@ -78,7 +78,7 @@ See the [NetworkPolicy getting started guide](/docs/getting-started-guides/netwo
|
|||||||
You can create a "default" isolation policy for a Namespace by creating a NetworkPolicy that selects all pods but does not allow any traffic:
|
You can create a "default" isolation policy for a Namespace by creating a NetworkPolicy that selects all pods but does not allow any traffic:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: default-deny
|
name: default-deny
|
||||||
@@ -91,7 +91,7 @@ This ensures that even pods that aren't selected by any other NetworkPolicy will
|
|||||||
Alternatively, if you want to allow all traffic for all pods in a Namespace (even if policies are added that cause some pods to be treated as "isolated"), you can create a policy that explicitly allows all traffic:
|
Alternatively, if you want to allow all traffic for all pods in a Namespace (even if policies are added that cause some pods to be treated as "isolated"), you can create a policy that explicitly allows all traffic:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: allow-all
|
name: allow-all
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Let's say you want to limit access to the `nginx` service so that only pods with
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
apiVersion: networking/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: access-nginx
|
name: access-nginx
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
Reference in New Issue
Block a user