An approach, called RSIR, for KDN (KDN) by adding a Knowledge Plane based on RL (RL) in SDN. RSIR defines an RL-based routing algorithm that considers link-state metrics to explore, learn, and exploit efficient routing paths even under dynamic traffic changes. This algorithm capitalizes on the interaction with the environment (RL) and the global view of the network (SDN), to proactively install, in advance, routes that meet traffic demands. This proactive approach allows the reduction of the latency in calculating and installing routes in traditional SDN. RSIR has extensively been evaluated by emulation using real traffic matrices from the GÉANT network. Results demonstrate that RSIR outperforms Dijkstra-based routing algorithms with dynamic link costs (i.e., delay or loss), when considering the stretch of routing paths, delay, loss, and used bandwidth in the network as metrics of comparison.