-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS-3691: Ported Network Polices to OSD/ROSA #48324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
EricPonvelle
merged 1 commit into
openshift:main
from
EricPonvelle:OSDOCS-3691_NetworkingPort
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,62 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * networking/network_policy/creating-network-policy.adoc | ||
| // * post_installation_configuration/network-configuration.adoc | ||
|
|
||
| :_content-type: PROCEDURE | ||
| [id="nw-networkpolicy-create-ocm_{context}"] | ||
| = Creating a network policy using {cluster-manager} | ||
|
|
||
| To define granular rules describing the ingress or egress network traffic allowed for namespaces in your cluster, you can create a network policy. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You logged in to {cluster-manager-url}. | ||
| * You created an {product-title} cluster. | ||
| * You configured an identity provider for your cluster. | ||
| * You added your user account to the configured identity provider. | ||
| * You created a project within your {product-title} cluster. | ||
|
|
||
| .Procedure | ||
|
|
||
| . From {cluster-manager-url}, click on the cluster you want to access. | ||
|
|
||
| . Click *Open console* to navigate to the OpenShift web console. | ||
|
|
||
| . Click on your identity provider and provide your credentials to log in to the cluster. | ||
|
|
||
| . From the administrator perspective, under *Networking*, click *NetworkPolicies*. | ||
|
|
||
| . Click *Create NetworkPolicy*. | ||
|
|
||
| . Provide a name for the policy in the *Policy name* field. | ||
|
|
||
| . Optional: You can provide the label and selector for a specific pod if this policy applies only to one or more specific pods. If you do not select a specific pod, then this policy will be applicable to all pods on the cluster. | ||
|
|
||
| . Optional: You can block all ingress and egress traffic by using the *Deny all ingress traffic* or *Deny all egress traffic* checkboxes. | ||
|
|
||
| . You can also add any combination of ingress and egress rules, allowing you to specify the port, namespace, or IP blocks you want to approve. | ||
|
|
||
| . Add ingress rules to your policy: | ||
|
|
||
| .. Select *Add ingress rule* to configure a new rule. This action creates a new *Ingress rule* row with an *Add allowed source* drop-down menu that enables you to specify how you want to limit inbound traffic. The drop-down menu offers three options to limit your ingress traffic: | ||
| + | ||
| *** *Allow pods from the same namespace* limits traffic to pods within the same namespace. You can specify the pods in a namespace, but leaving this option blank allows all of the traffic from pods in the namespace. | ||
|
|
||
| *** *Allow pods from inside the cluster* limits traffic to pods within the same cluster as the policy. You can specify namespaces and pods from which you want to allow inbound traffic. Leaving this option blank allows inbound traffic from all namespaces and pods within this cluster. | ||
|
|
||
| *** *Allow peers by IP block* limits traffic from a specified Classless Inter-Domain Routing (CIDR) IP block. You can block certain IPs with the exceptions option. Leaving the CIDR field blank allows all inbound traffic from all external sources. | ||
|
|
||
| .. You can restrict all of your inbound traffic to a port. If you do not add any ports then all ports are accessible to traffic. | ||
|
|
||
| . Add egress rules to your network policy: | ||
|
|
||
| .. Select *Add egress rule* to configure a new rule. This action creates a new *Egress rule* row with an *Add allowed destination*"* drop-down menu that enables you to specify how you want to limit outbound traffic. The drop-down menu offers three options to limit your egress traffic: | ||
| + | ||
| *** *Allow pods from the same namespace* limits outbound traffic to pods within the same namespace. You can specify the pods in a namespace, but leaving this option blank allows all of the traffic from pods in the namespace. | ||
|
|
||
| *** *Allow pods from inside the cluster* limits traffic to pods within the same cluster as the policy. You can specify namespaces and pods from which you want to allow outbound traffic. Leaving this option blank allows outbound traffic from all namespaces and pods within this cluster. | ||
|
|
||
| *** *Allow peers by IP block* limits traffic from a specified CIDR IP block. You can block certain IPs with the exceptions option. Leaving the CIDR field blank allows all outbound traffic from all external sources. | ||
|
|
||
| .. You can restrict all of your outbound traffic to a port. If you do not add any ports then all ports are accessible to traffic. |
This file contains hidden or 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
This file contains hidden or 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,30 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * networking/network_policy/deleting-network-policy.adoc | ||
| // * post_installation_configuration/network-configuration.adoc | ||
|
|
||
| :_content-type: PROCEDURE | ||
| [id="nw-networkpolicy-delete-ocm_{context}"] | ||
| = Deleting a network policy using {cluster-manager} | ||
|
|
||
| You can delete a network policy in a namespace. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You logged in to {cluster-manager-url}. | ||
| * You created an {product-title} cluster. | ||
| * You configured an identity provider for your cluster. | ||
| * You added your user account to the configured identity provider. | ||
|
|
||
| .Procedure | ||
|
|
||
| . From the *Administrator* perspective in the {cluster-manager} web console, under *Networking*, click *NetworkPolicies*. | ||
|
|
||
| . Use one of the following methods for deleting your network policy: | ||
|
|
||
| ** Delete the policy from the *Network Policies* table: | ||
| .. From the *Network Policies* table, select the stack menu on the row of the network policy you want to delete and then, click *Delete NetworkPolicy*. | ||
|
|
||
| ** Delete the policy using the *Actions* drop-down menu from the individual network policy details: | ||
| .. Click on *Actions* drop-down menu for your network policy. | ||
| .. Select *Delete NetworkPolicy* from the menu. |
This file contains hidden or 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
This file contains hidden or 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,32 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * networking/network_policy/viewing-network-policy.adoc | ||
| // * post_installation_configuration/network-configuration.adoc | ||
|
|
||
| :_content-type: PROCEDURE | ||
| [id="nw-networkpolicy-view-ocm_{context}"] | ||
| = Viewing network policies using {cluster-manager} | ||
|
|
||
| You can view the configuration details of your network policy in {cluster-manager-first}. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You logged in to {cluster-manager-url}. | ||
| * You created an {product-title} cluster. | ||
| * You configured an identity provider for your cluster. | ||
| * You added your user account to the configured identity provider. | ||
| * You created a network policy. | ||
|
|
||
| .Procedure | ||
|
|
||
| . From the *Administrator* perspective in the {cluster-manager} web console, under *Networking*, click *NetworkPolicies*. | ||
| . Select the desired network policy to view. | ||
| . In the *Network Policy* details page, you can view all of the associated ingress and egress rules. | ||
| . Select *YAML* on the network policy details to view the policy configuration in YAML format. | ||
| ifdef::openshift-rosa,openshift-dedicated[] | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| You can only view the details of these policies. You cannot edit these policies. | ||
| ==== | ||
| endif::[] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.