In this work, we study the generalized Klein–Gordon oscillator with interactions on a curved background within the Kaluza–Klein theory. We solve the generalized Klein–Gordon oscillator in the cosmic string space-time with a linear scalar potential and obtain the energy eigenvalue and corresponding eigenfunction. We show that the energy spectrum depends on the global parameters characterizing the space-time and the confining potential parameter. We also solve the generalized Klein–Gordon oscillator in a magnetic cosmic string background in the Kaluza–Klein theory with a linear scalar potential and analyze the analogue effect to the Aharonov–Bohm effect for bound states.