Of course, but HCL imo is a much better alternative when compared to how yaml is used in k8s.
With nomad resulting HCL code even in unrendered state is a much more readable when compared to most k8s manifests.
With k8s yaml at some point becomes cumbersome and clunky to use. There might be some practices regarding writing manifests, that i am unaware of that alleviate these issues, but atm i would prefer working with HCL over yaml.
And regarding consul. K8s and consul use go templating, which in general feels ok.