-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add documentation about required network policy for multitentan… (
#2432) Co-authored-by: Max Leonov <mleonov@redhat.com> Co-authored-by: David Kwon <dakwon@redhat.com>
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
modules/administration-guide/pages/configuring-network-policies.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
:_content-type: CONCEPT | ||
:description: Configuring network policies | ||
:keywords: administration guide, configuring, namespace, network policy, network policies, multitenant isolation | ||
:navtitle: Configuring network policies | ||
:page-aliases: installation-guide:configuring-network-policies.adoc | ||
|
||
[id="configuring-networking-policies_{context}"] | ||
= Configuring network policies | ||
|
||
By default, all Pods in a {orch-name} cluster can communicate with each other even if they are in different namespaces. | ||
In the context of {prod-short}, this makes it possible for a workspace Pod in one user {orch-namespace} to send traffic to another workspace Pod in a different user {orch-namespace}. | ||
|
||
For security, multitenant isolation could be configured by using NetworkPolicy objects to restrict all incoming communication to Pods in a user {orch-namespace}. | ||
However, Pods in the {prod-short} {orch-namespace} must be able to communicate with Pods in user {orch-namespace}s. | ||
|
||
For a cluster with network restrictions such as multitenant isolation already configured, you must apply the `allow-from-{prod-namespace}` NetworkPolicy to each user {orch-namespace}. The `allow-from-{prod-namespace}` NetworkPolicy allows incoming traffic from the {prod-short} namespace to all Pods in the user {orch-namespace}. | ||
|
||
|
||
.`allow-from-{prod-namespace}.yaml` | ||
==== | ||
[source,yaml,subs="+quotes,attributes"] | ||
---- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: allow-from-{prod-namespace} | ||
spec: | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: {prod-namespace} <1> | ||
podSelector: {} <2> | ||
policyTypes: | ||
- Ingress | ||
---- | ||
==== | ||
<1> The {prod-short} namespace. The default is `{prod-namespace}`. | ||
<2> The empty `podSelector` selects all Pods in the {orch-namespace}. | ||
|
||
.Additional resources | ||
|
||
* xref:configuring-namespace-provisioning.adoc[] | ||
|
||
* link:https://kubernetes.io/docs/concepts/security/multi-tenancy/#network-isolation[Network isolation] | ||
|
||
* link:https://docs.openshift.com/container-platform/{ocp4-ver}/networking/network_policy/multitenant-network-policy.html[Configuring multitenant isolation with network policy] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters