What is the origin of the phrase 'two peas in a pod'?

The origin of the phrase 'two peas in a pod' is from 16th century England. It is a simile that was created by John Lyly. It used to be a very popular phrase, now it has become less common.