Passage
For he knew him who would betray him, therefore he said, “You are not all clean.”
For he knew him who would betray him, therefore he said, “You are not all clean.”
John 13:9 Simon Peter said to him, “Lord, not my feet only, but also my hands and my head!”
John 13:10 Jesus said to him, “Someone who has bathed only needs to have his feet washed, but is completely clean. You are clean, but not all of you.”
John 13:11 For he knew him who would betray him, therefore he said, “You are not all clean.”
John 13:12 So when he had washed their feet, put his outer garment back on, and sat down again, he said to them, “Do you know what I have done to you?
John 13:13 You call me, ‘Teacher’ and ‘Lord.’ You say so correctly, for so I am.
The verse centers on "knew", "betray", "therefore", "said", and "clean". It is saying that the verse draws attention to "knew" and "betray", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 10's "Jesus said to him Someone who has..." into verse 12's "So when he had washed their feet...", so "knew" and "betray" belong inside that flow. In John context, the local focus is the identity of Jesus, new birth, eternal life, and belief and unbelief.
A plain takeaway is to answer the verse's own emphasis on "knew" and "betray" with trust shaped by these words, not by a vague optimism outside the passage.