Firstly, one would need to distinguish between a proposition being certain and a person being certain of it. All kinds of propositions might be certainly true (e.g. mathematical or logical theorems) but being certain of them requires sufficient competence on the part of a person to recognise it. Since you are contrasting certainty with knowledge, I assume you are interested in the latter. We should also make it clear that we are talking about an epistemically justifiable kind of certainty, rather than just a psychological condition. After all, people can be certain of all kinds of things, including things that most others would consider plainly false.
Some kinds of uncertainty (not all) can be represented as epistemic probabilities: we might call them credences or degrees of belief. The fact that credences obey the probability calculus can be justified on the basis of decision theory or on the basis of how credences behave inferentially when used in the context of deductive arguments. We could then say that a credence in A is certain if P(A) = 1. The problem is that we are hardly ever justified in claiming that something is absolutely certain. Indeed, in Bayesian theory there is a principle called the Cromwell Rule that we never assign probability zero or one to any proposition, because of the possibility of error.
This means the closest we can get to a certain credence is that P(A) > 1 - e, where e is some error threshold. In some circumstances this might work as a criterion of knowledge: we might say that a person knows A if their e is sufficiently small. But knowledge is a slippery concept and a great deal of ink has been spilled trying to analyse it. As various counterexamples due to Gettier and others have shown, even when there is strong justification for a credence in A, we tend to disallow that someone knows A if they just got lucky. So, knowledge and high degree of credence can come apart.
As to whether one can be certain about one's knowledge, this might be thought of as whether there can be degrees of uncertainty about one's level of uncertainty. We might try to represent this a meta level probability statement, such as P( P(A) > 1 - e1) > 1 - e2. This is possible, but rather clumsy. A simpler approach would be to treat the credence as having a range of values, or a probability distribution.