:_mod-docs-content-type: ASSEMBLY
[id="configuring-ingress-cluster-traffic-ingress-controller"]
= Configuring ingress cluster traffic by using an Ingress Controller
include::_attributes/common-attributes.adoc[]
:context: configuring-ingress-cluster-traffic-ingress-controller

toc::[]

[role="_abstract"]
You can use the Ingress Controller to control how external users communicate with services that run inside the cluster.

ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
Before you begin any of the procedures that are listed in the Configuring ingress cluster traffic by using an Ingress Controller document, ensure that you meet the following prerequisites. A cluster administrator performs these prerequisites:

* Set up the external port to the cluster networking environment so that requests
can reach the cluster.

* Make sure there is at least one user with cluster admin role. To add this role
to a user, run the following command:
+
[source,terminal]
----
$ oc adm policy add-cluster-role-to-user cluster-admin username
----

* You have an {product-title} cluster with at least one master and at least one node and a system outside the cluster that has network access to the cluster. This procedure assumes that the external system is on the same subnet as the cluster. The additional networking required for external systems on a different subnet is out-of-scope for this topic.

include::modules/nw-using-ingress-and-routes.adoc[leveloffset=+1]
endif::[]

// Creating a project and service
include::modules/nw-creating-project-and-service.adoc[leveloffset=+1]

// Exposing the service by creating a route
include::modules/nw-exposing-service.adoc[leveloffset=+1]

ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
// Ingress sharding in OpenShift Container Platform
include::modules/nw-ingress-sharding-concept.adoc[leveloffset=+1]

// Ingress Controller sharding
include::modules/nw-ingress-sharding.adoc[leveloffset=+1]

// Traditional sharding example
include::modules/nw-traditional-sharding.adoc[leveloffset=+2]

// Overlapped sharding example
include::modules/nw-overlapped-sharding.adoc[leveloffset=+2]

// Sharding the default Ingress Controller
include::modules/nw-ingress-sharding-default.adoc[leveloffset=+2]

// Ingress sharding and DNS
include::modules/nw-ingress-sharding-dns.adoc[leveloffset=+2]

// Configuring Ingress Controller sharding by using route labels
include::modules/nw-ingress-sharding-route-labels.adoc[leveloffset=+2]

// Configuring Ingress Controller sharding by using namespace labels
include::modules/nw-ingress-sharding-namespace-labels.adoc[leveloffset=+2]

// Creating a route for Ingress Controller sharding
include::modules/nw-ingress-sharding-route-configuration.adoc[leveloffset=+2]

[id="additional-resources_ingress-sharding"]
=== Additional resources

* xref:../../../scalability_and_performance/optimization/routing-optimization.adoc#baseline-router-performance_routing-optimization[Baseline Ingress Controller (router) performance]

* xref:../../../networking/networking_operators/ingress-operator.adoc#configuring-ingress-controller[Configuring the Ingress Controller]

* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installing-bare-metal[Installing a cluster on bare metal]

* xref:../../../installing/installing_vsphere/upi/installing-vsphere.adoc#installing-vsphere[Installing a cluster on vSphere]

* xref:../../../networking/network_security/network_policy/about-network-policy.adoc#about-network-policy[About network policy]
endif::openshift-enterprise,openshift-webscale,openshift-origin[]
