Custom softwares installation on kubernetes

Hi, I just want to install custom software on my kubernetes cluster worker nodes one time. Like JDK, terraform.exe on it. Can anyone guide me on that, how can i do that. I tried many things like creating a docker file with custom installations, and then deploying it, but pods failed to start every time.