3
3
This section describes how to override the Calico-enabled Network Policy using higher priority system-wide
4
4
network policy.
5
5
6
- In the following we describe how to create a ` GlobalNetworkPolicy ` resource using ` kubectl ` to allow all
7
- ingress and egress traffic, overriding any other Network Policy that has been configured.
6
+ In the following we describe how to create a ` GlobalNetworkPolicy ` ( ` SystemNetworkPolicy ` for Calico ` v2.4.x ` or older)
7
+ resource using ` kubectl ` to allow all ingress and egress traffic, overriding any other Network Policy that has been configured.
8
8
9
9
### Requirements / Assumptions
10
10
11
- - Calico version v2.5 or higher
12
- - Kubernetes v1.7 or higher
11
+ - Calico version ` v2.3 ` or higher
12
+ - Kubernetes ` v1.6 ` or higher
13
13
- Calico is running in policy-only mode (without Calico networking)
14
14
- Calico is using using the Kubernetes API as the datastore
15
15
@@ -19,17 +19,33 @@ ingress and egress traffic, overriding any other Network Policy that has been co
19
19
20
20
#### Override Calico policy to allow all traffic
21
21
22
- Create a ` GlobalNetworkPolicy ` resource by running the following command:
22
+ Create a policy-override resource by running the following command:
23
+
24
+ For Calico ` v2.5.x ` or higher:
23
25
24
26
```
25
27
kubectl create -f=https://raw.githubusercontent.com/projectcalico/calico/master/hack/remove-calico-policy/global-network-policy-override.yaml
26
28
```
27
29
30
+ For Calico ` v2.3.x ` and ` v2.4.x ` :
31
+
32
+ ```
33
+ kubectl create -f=https://raw.githubusercontent.com/projectcalico/calico/master/hack/remove-calico-policy/system-network-policy-override.yaml
34
+ ```
35
+
28
36
#### Revert override to enable Calico policy
29
37
30
- To revert the override of Calico policy, delete the ` GlobalNetworkPolicy ` resource
38
+ To revert the override of Calico policy, delete the policy-override resource
31
39
responsible for the override by running the following command:
32
40
41
+ For Calico ` v2.5.x ` or higher:
42
+
33
43
```
34
44
kubectl delete -f=https://raw.githubusercontent.com/projectcalico/calico/master/hack/remove-calico-policy/global-network-policy-override.yaml
35
45
```
46
+
47
+ For Calico ` v2.3.x ` and ` v2.4.x ` :
48
+
49
+ ```
50
+ kubectl delete -f=https://raw.githubusercontent.com/projectcalico/calico/master/hack/remove-calico-policy/system-network-policy-override.yaml
51
+ ```
0 commit comments