Striving for cloud agnostic is the wrong goal. If you sell software that runs in the customer cloud, then you will want to support multiple clouds.
Kubernetes will not get you either. You still have cloud specific to stand it up and more.
The short of it is that you cannot be cloud agnostic without significantly more code and complexity. Best to have a few configuration points. Even with Kubernetes, you will still have cloud specific pieces. Without, you can still get many of the benefits with Packer + Terraform.
A good question is what is the purported benefit of going cloud agnostic. If it's to switch clouds, that is not a good one. You won't do it often enough to get an ROI. What is the cost to develop and maintain this posture? (significant)