Suppose $A$ and $B$ are two $n\times n$ real symmetric matrices. $A$ is positive semidefinite. Then for what values of real number $k$, matrix $(kA-B)$ is positive semidefinite (we write as $kA-B\succeq0$)?

If $A$ is positive definite, we may find an $n\times n$ nonsingular matrix $D$ such that $A=D^T D$. As a result, $kA-B\succeq0$ is equivalent to $$kI\succeq (D^{-1})^TBD^{-1},$$ or $k\geq \lambda_{\max}((D^{-1})^TBD^{-1}))$.

But how to deal with the situation when $A$ is singular (but still positive semidefinite)? I know for certain that in this case we must impose additional constraint on matrix $B$. In particular, let the columns of matrix $N$ consist of a basis of the null space of $A$, then we must have that $N^T B N \preceq 0$ (i.e., $N^T B N$ is negative semidefinite). But what is the lower bound on $k$?

Thanks.