A generalized non-harmonic oscillator potential for spin 1/2 particles is studied. The Dirac Hamiltonian contains a scalar and a vector non-harmonic oscillator potentials. Setting either or both combinations Σ(r)=S(r)+V(r) and Δ(r)=V(r)-S(r) to zero, analytical solutions for bound states of the corresponding Dirac equation are found. The eigenenergies and wave functions are presented, showing the pseudospin symmetry exists exactly.The relations between radial nodes of upper and lower components of the Dirac spinor are obtained.