It can't fix what's inside your containers, but it can fix how efficient you're in packing your workloads onto available hw. I.e. Given a set of Workloads, set of available hw, k8s will help you find maximal amount of Workloads that you can fit.
vs. for example manually trying to fit single-purpose VM instances in EC2, with inevitable overheads, etc.
In what way? If the content of your containers is a wasteful, inefficient mess, then there's nothing Kubernetes can do to make it less inefficient.