Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: projectcalico.org/v3
- kind: NetworkPolicy
- metadata:
- name: allow-nginx-ingress-to-glance
- namespace: ma3x-glance
- spec:
- selector: app == "glance"
- types:
- - Ingress
- - Egress
- ingress:
- - action: Allow
- protocol: TCP
- source:
- namespaceSelector: projectcalico.org/name == "ingress-nginx"
- selector: app.kubernetes.io/component == "controller" && app.kubernetes.io/name == "ingress-nginx"
- destination:
- ports:
- - 8080
- egress:
- - action: Allow
- protocol: TCP
- destination:
- namespaceSelector: projectcalico.org/name == "ingress-nginx"
- selector: app.kubernetes.io/component == "controller" && app.kubernetes.io/name == "ingress-nginx"
- ports:
- - 1024:65535
- ---
- apiVersion: projectcalico.org/v3
- kind: NetworkPolicy
- metadata:
- name: allow-glance-to-nginx-ingress
- namespace: ingress-nginx
- spec:
- selector: app.kubernetes.io/component == "controller" && app.kubernetes.io/name == "ingress-nginx"
- types:
- - Ingress
- - Egress
- ingress:
- - action: Allow
- protocol: TCP
- source:
- namespaceSelector: projectcalico.org/name == "ma3x-glance"
- selector: app == "glance"
- ports:
- - 1024:65535
- egress:
- - action: Allow
- protocol: TCP
- destination:
- namespaceSelector: projectcalico.org/name == "ma3x-glance"
- selector: app == "glance"
- ports:
- - 8080
Advertisement
Add Comment
Please, Sign In to add comment