Custom plugin with secret

Hi I have a question can the custom plugin read config from Kubernetes Secret resource? And how to do it. Thank you