In the parable (allegory) of the Good Shepherd Jesus draws the picture of the hostile Pharisees and intimates that He is going to die for His flock and come to life again

Joh 10:1-21
1 Truly I say to you, He who does not go through the door into the place where the sheep are kept, but gets in by some other way, is a thief and an outlaw.
2 He who goes in by the door is the keeper of the sheep.
3 The porter lets him in; and the sheep give ear to his voice; he says over the names of the sheep, and takes them out.
4 When he has got them all out, he goes before them, and the sheep go after him, for they have knowledge of his voice.
5 They will not go after another who is not their keeper, but will go from him in flight, because his voice is strange to them.
6 In this Jesus was teaching them in the form of a story: but what he said was not clear to them.
7 So Jesus said again, Truly I say to you, I am the door of the sheep.
8 All who came before me are thieves and outlaws: but the sheep did not give ear to them.
9 I am the door: if any man goes in through me he will have salvation, and will go in and go out, and will get food.
10 The thief comes only to take the sheep and to put them to death: he comes for their destruction: I have come so that they may have life and have it in greater measure.
11 I am the good keeper of sheep: the good keeper gives his life for the sheep.
12 He who is a servant, and not the keeper or the owner of the sheep, sees the wolf coming and goes in flight, away from the sheep; and the wolf comes down on them and sends them in all directions:
13 Because he is a servant he has no interest in the sheep.
14 I am the good keeper; I have knowledge of my sheep, and they have knowledge of me,
15 Even as the Father has knowledge of me and I of the Father; and I am giving my life for the sheep.
16 And I have other sheep which are not of this field: I will be their guide in the same way, and they will give ear to my voice, so there will be one flock and one keeper.
17 For this reason am I loved by the Father, because I give up my life so that I may take it again.
18 No one takes it away from me; I give it up of myself. I have power to give it up, and I have power to take it again. These orders I have from my Father.
19 There was a division again among the Jews because of these words.
20 And a number of them said, He has an evil spirit and is out of his mind; why do you give ear to him?
21 Others said, These are not the words of one who has an evil spirit. Is it possible for an evil spirit to make blind people see?