Electron Cyclotron Resonance (ECR) ion source plasmas are prone to kinetic instabilities. The onset of the instabilities manifests as emission of microwaves, bursts of electrons expelled from the plasma volume, and the collapse of the extracted highly charged ion (HCI) currents. Consequently, the instabilities limit the HCI performance of ECR ion sources by limiting the parameter space available for ion source optimization. Previous studies have shown that the transition from stable to unstable plasma regime is strongly influenced by the magnetic field structure, especially the minimum field value inside the magnetic trap (Bmin). This work focuses to study the role of the magnetic confinement on the onset of the kinetic instabilities by probing the influence of the injection and extraction mirror field variation on the instability threshold. The experiments have been performed with a room-temperature 14.5 GHz ECR ion source with an axially movable middle coil that provides flexible control over the axial field profile and especially the Bmin, which was used to quantify the variation in the instability threshold. The experimental results show that variation of the extraction field Bext, which defines the weakest magnetic mirror, correlates systematically with the variation of the instability threshold; decreasing the Bext allows higher threshold Bmin. The result demonstrates the importance of electron confinement and losses on the plasma stability. The connection between the weakest mirror field and the onset of instabilities is discussed taking into account the variation of magnetic field gradient and resonance plasma volume.