In general, the system of 2nd-order partial differential equations made of the Euler–Lagrange equations of classical field theories are not compatible for singular Lagrangians. This is the so-called second-order problem. The first aim of this work is to develop a fully geometric constraint algorithm which allows us to find a submanifold where the Euler–Lagrange equations have solution, and split the constraints into two kinds depending on their origin. We do so using k-symplectic geometry, which is the simplest intrinsic description of classical field theories. As a second aim, the Einstein–Palatini model of General Relativity is studied using this algorithm.