The holy trinity wasn't known to Jesus at the time of his life or death. It became apparent that he, the holy spirit, and god were the same post resurrection. That's what separates Jesus from other canonical characters like saints and disciples - he was destined to become one because it was God's manifestation of himself. The others are just humans with extraordinary presence whom God chooses to act on the world through. It was pretty clear Jesus perceived himself as the latter.
Anyway, I could be wrong. I learned all this nearly 20 years ago and only remember it because it was beat into me.