I would like to know, in which configuration we mention the subnet address from which the IP addresses are picked whenever we create route or pods
I'm not sure I'm correctly following what you're asking for, but here is a snip from the openshift-ansible installer example inventory file for OCP v3.11 (You can check the other release versions on their respective branches as well). Here you can see a number of configuration variables around the SDN, including CIDR block ranges:
# Configure SDN cluster network and kubernetes service CIDR blocks. These # network blocks should be private and should not conflict with network blocks # in your infrastructure that pods may require access to. Can not be changed # after deployment. # # WARNING : Do not pick subnets that overlap with the default Docker bridge subnet of # 172.17.0.0/16. Your installation will fail and/or your configuration change will # cause the Pod SDN or Cluster SDN to fail. # # WORKAROUND : If you must use an overlapping subnet, you can configure a non conflicting # docker0 CIDR range by adding '--bip=192.168.2.1/24' to DOCKER_NETWORK_OPTIONS # environment variable located in /etc/sysconfig/docker-network. # When upgrading or scaling up the following must match whats in your master config! # Inventory: master yaml field # osm_cluster_network_cidr: clusterNetworkCIDR # openshift_portal_net: serviceNetworkCIDR # When installing osm_cluster_network_cidr and openshift_portal_net must be set. # Sane examples are provided below. #osm_cluster_network_cidr=10.128.0.0/14 #openshift_portal_net=172.30.0.0/16 # ExternalIPNetworkCIDRs controls what values are acceptable for the # service external IP field. If empty, no externalIP may be set. It # may contain a list of CIDRs which are checked for access. If a CIDR # is prefixed with !, IPs in that CIDR will be rejected. Rejections # will be applied first, then the IP checked against one of the # allowed CIDRs. You should ensure this range does not overlap with # your nodes, pods, or service CIDRs for security reasons. #openshift_master_external_ip_network_cidrs=['0.0.0.0/0'] # IngressIPNetworkCIDR controls the range to assign ingress IPs from for # services of type LoadBalancer on bare metal. If empty, ingress IPs will not # be assigned. It may contain a single CIDR that will be allocated from. For # security reasons, you should ensure that this range does not overlap with # the CIDRs reserved for external IPs, nodes, pods, or services. #openshift_master_ingress_ip_network_cidr=184.108.40.206/16 # Configure number of bits to allocate to each host's subnet e.g. 9 # would mean a /23 network on the host. # When upgrading or scaling up the following must match whats in your master config! # Inventory: master yaml field # osm_host_subnet_length: hostSubnetLength # When installing osm_host_subnet_length must be set. A sane example is provided below. #osm_host_subnet_length=9
A collaborative learning environment, enabling open source skill development.