For minimizing an objective with bound constraints
\begin{align*}
\min_{x\in\mathbb{R}^{N}}J(x) \\
\text{such that } c_{i}(x) \geq 0,\,\,\,1\leq i\leq k
\end{align*}
one can follow the Lagrangian formalism by first forming the Lagrangian functional
\begin{align*}
\mathcal{L}(x,\lambda)=J(x)-\sum_{i=1}^{k}\lambda_{i}c_{i}(x)
\end{align*}
The KKT conditions are composed of two equations, first is stationarity of the Lagrangian
\begin{align*}
\nabla_{x}\mathcal{L}(x,\lambda)=\nabla_{x}J(x)-\sum_{i=1}^{k}\lambda_{i}\nabla_{x}c_{i}(x)=0.
\end{align*}
The next equation is that a complementarity condition holds
\begin{align*}
\lambda_{i}\geq 0,\,\,\,c_{i}(x)\geq0,\,\,\,\lambda_{i}c_{i}(x)=0,\,\,\,1\leq i\leq k.
\end{align*}
For more details, I would suggest looking at the following text (https://link.springer.com/book/10.1007/978-0-387-40065-5).