Let $f : \mathbb{R}^n \to \mathbb{R}$ be a convex function attaining its minimum on a (convex) set $K$, and take $x \in \partial K$. When can we say that the normal cone to $K$ at $x$ satisfies $N_K(x) = \mathrm{cone}\,\partial f(x)$?
Since $K$ is a sublevel set of $f$, it's a simple exercise to show that $N_K(x) \supset \mathrm{cone}\,\partial f(x)$. Were $K$ to be any other sublevel set of $f$, we would certainly have the other containment as well. However, the standard proof (see e.g. Variational analysis in Sobolev and BV spaces, Prop 9.6.1) breaks down when $0 \in \partial f(x)$, and the desired equality is not true in general.
A simple counterexample is $f(y) = y^2$, with $\mathrm{cone}\,\partial f(0) = \{0\} \neq N_{\{0\}}(0) = \mathbb{R}$. However, the cases I've checked with non-smooth behavior along $\partial K$ seem to work. For example, taking $f(y) = |y|$, we have $\mathrm{cone}\,\partial f(0) = \mathbb{R}_+ [-1,1] = N_{\{0\}}(0) = \mathbb{R}$. From this, one might conjecture that the desired equality holds as long as $\partial f(x) \neq \{0\}$, but this fails for $f(y,z) = y^2 + |z|$.
I suspect that $\mathrm{int}\,\partial f(x) \neq \emptyset$ is a sufficient condition, but perhaps this is too optimistic.