Best practice of performance and security in deployment

I have a general question. What is the best practices of security and performance on a deployment? If I want to specific it to a technology I can said Kubernetes and Docker and AWS. I know it is very general question But It help me a lot.