He knew who would betray him. That's why he said, "Not every one of you is clean."
After he washed the disciples' feet, he put on his robes and returned to his place at the table. He said to them, “Do you know what I've done for you?
You call me ‘Teacher' and ‘Lord,' and you speak correctly, because I am.
If I, your Lord and teacher, have washed your feet, you too must wash each other's feet.
I have given you an example: Just as I have done, you also must do.
I assure you, servants aren't greater than their master, nor are those who are sent greater than the one who sent them.
Since you know these things, you will be happy if you do them.
I'm not speaking about all of you. I know those whom I've chosen. But this is to fulfill the scripture, The one who eats my bread has turned against me.
References for John 13:18
"I'm telling you this now, before it happens, so that when it does happen you will believe that I Am.
I assure you that whoever receives someone I send receives me, and whoever receives me receives the one who sent me."
After he said these things, Jesus was deeply disturbed and testified, "I assure you, one of you will betray me."
References for John 13:21